diff --git a/lib/src/widget/helper/smart_overlay.dart b/lib/src/widget/helper/smart_overlay.dart index 2e1ffe1..af41e9e 100644 --- a/lib/src/widget/helper/smart_overlay.dart +++ b/lib/src/widget/helper/smart_overlay.dart @@ -47,11 +47,6 @@ class _SmartOverlayState extends State { SmartAllDialogType.loading, SmartAllDialogType.toast, }); - - if (!visible) { - DialogProxy.instance.entryNotify.remove(); - DialogProxy.instance.entryLoading.remove(); - } }); }), ); @@ -61,6 +56,8 @@ class _SmartOverlayState extends State { @override Widget build(BuildContext context) { if (!visible) { + DialogProxy.instance.entryNotify.remove(); + DialogProxy.instance.entryLoading.remove(); return const SizedBox.shrink(); } diff --git a/pubspec.yaml b/pubspec.yaml index b074b1b..70e5ca4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: An elegant Flutter Dialog solution, Easily implement Toast, Loading and custom Dialog, Make the use of the dialog easier! -version: 4.9.7+2 +version: 4.9.7+3 homepage: https://github.com/fluttercandies/flutter_smart_dialog # flutter pub publish --server=https://pub.dartlang.org # flutter build web --release --base-href="/flutter_smart_dialog/web/"