diff --git a/lib/src/controller.dart b/lib/src/controller.dart index bae7712..4df74f3 100644 --- a/lib/src/controller.dart +++ b/lib/src/controller.dart @@ -14,6 +14,7 @@ abstract class DialogController extends ChangeNotifier T _value; bool get isClose; + bool _isClosed = false; AnimationConfig animate; AnimationConfig leaveAnimate; @@ -33,6 +34,8 @@ abstract class DialogController extends ChangeNotifier set value(v) { _value = v; + if (_isClosed) return; + _isClosed = isClose; notifyListeners(); if (isClose) { close(); @@ -144,11 +147,7 @@ class ProgressController extends OverlayController { super.remove(); } - bool completed = false; - void complete() { - if (completed) return; - completed = true; value = 1; }