removed timer screen auto-dismiss

This commit is contained in:
Vadim 2024-05-04 21:13:06 +02:00
parent 29b6b351c0
commit bd740cc7dc

View file

@ -44,9 +44,7 @@ class TimerScreenState extends State<TimerScreen> with TickerProviderStateMixin
timelineController = AnimationController(vsync: this, duration: widget.duration); timelineController = AnimationController(vsync: this, duration: widget.duration);
timelineAnimation = Tween<double>(begin: 1, end: 0).animate(timelineController); timelineAnimation = Tween<double>(begin: 1, end: 0).animate(timelineController);
timelineController.addStatusListener((status) { timelineController.addStatusListener((status) {
if (timelineController.value == 1) { if (status == AnimationStatus.completed) {
Navigator.of(context).pop();
} else if (status == AnimationStatus.completed) {
context.read<TimerBloc>().add(const TimerEndedEvent()); context.read<TimerBloc>().add(const TimerEndedEvent());
} }
}); });