Skip to content

Commit

Permalink
Double check countdown is not disposed before redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone Sestito committed Oct 29, 2018
1 parent 990ad12 commit e8195b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/route/home/HomeFragment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class CounterState extends State<Counter> {
void _run() async {
while (isRunning) {
await Future.delayed(const Duration(seconds: 1));
setState(() {});
if (isRunning) setState(() {});
}
}

Expand Down

0 comments on commit e8195b8

Please sign in to comment.