From b9b159bd4714284cc129a3f0bc95ac1064298759 Mon Sep 17 00:00:00 2001 From: LenonYe Date: Sun, 4 Apr 2021 13:22:09 +0800 Subject: [PATCH] reset download progress by calling setState, otherwise wave animation will cover buttons on upgrade dialog --- flutter_app_upgrade/lib/src/simple_app_upgrade.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flutter_app_upgrade/lib/src/simple_app_upgrade.dart b/flutter_app_upgrade/lib/src/simple_app_upgrade.dart index d02ab25..0f0f250 100644 --- a/flutter_app_upgrade/lib/src/simple_app_upgrade.dart +++ b/flutter_app_upgrade/lib/src/simple_app_upgrade.dart @@ -349,9 +349,11 @@ class _SimpleAppUpgradeWidget extends State { } }); } catch (e) { - print('$e'); - _downloadProgress = 0; + print('simple app upgrade error >> $e'); _updateDownloadStatus(DownloadStatus.error,error: e); + setState(() { + _downloadProgress = 0; + }); } }