diff --git a/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart b/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart index 871bb6e..4a506cc 100644 --- a/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart +++ b/lib/screens/metering/components/shared/readings_container/components/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart @@ -185,16 +185,15 @@ class AnimatedDialogState extends State with SingleTickerProvide _animateForward(); } - void _animateForward() { + Future _animateForward() async { setState(() { _isDialogShown = true; }); - _animationController.forward(); + await _animationController.forward(); } Future _animateReverse() async { - _animationController.reverse(); - await Future.delayed(_animationController.reverseDuration! * timeDilation); + await _animationController.reverse(); setState(() { _isDialogShown = false; });