forked from firka/student-legacy
wait for progress animation to finish
This commit is contained in:
parent
c418a61133
commit
428d6ff975
@ -51,6 +51,7 @@ class StatusProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
if (!_stack.contains(Status.syncing)) {
|
if (!_stack.contains(Status.syncing)) {
|
||||||
_stack.add(Status.syncing);
|
_stack.add(Status.syncing);
|
||||||
|
_progress = 0.0;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,9 +62,12 @@ class StatusProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_progress == 1.0) {
|
if (_progress == 1.0) {
|
||||||
_stack.remove(Status.syncing);
|
|
||||||
_progress = 0.0;
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
// Wait for animation
|
||||||
|
Future.delayed(Duration(milliseconds: 250), () {
|
||||||
|
_stack.remove(Status.syncing);
|
||||||
|
notifyListeners();
|
||||||
|
});
|
||||||
} else if (progress != prev) notifyListeners();
|
} else if (progress != prev) notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a0dcea3182921edc762a139225f584952cdbcb8d
|
Subproject commit 2c0d51853dcee3c7113892d39f71c91d3783fa07
|
Loading…
x
Reference in New Issue
Block a user