From 4fa67b86799a244b6fd5d40e1cc2d05b581e16c0 Mon Sep 17 00:00:00 2001 From: shirne Date: Fri, 22 Sep 2023 20:43:16 +0800 Subject: [PATCH] fix --- lib/src/controller.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/controller.dart b/lib/src/controller.dart index 4d03cec..21cbf34 100644 --- a/lib/src/controller.dart +++ b/lib/src/controller.dart @@ -144,7 +144,11 @@ class ProgressController extends OverlayController { super.remove(); } + bool completed = false; + void complete() { + if (completed) return; + completed = true; value = 1; } @@ -174,7 +178,7 @@ class ProgressController extends OverlayController { double get value => min(1, aController?.value ?? _value); @override - bool get isClose => value >= 1; + bool get isClose => completed || value >= 1; } class EntryController extends OverlayController {