FlutterError: Null check operator used on a null value

This commit is contained in:
Vadim 2023-05-04 13:12:15 +02:00
parent 97c65675f6
commit 0d8f125a63

View file

@ -185,16 +185,15 @@ class AnimatedDialogState extends State<AnimatedDialog> with SingleTickerProvide
_animateForward();
}
void _animateForward() {
Future<void> _animateForward() async {
setState(() {
_isDialogShown = true;
});
_animationController.forward();
await _animationController.forward();
}
Future<void> _animateReverse() async {
_animationController.reverse();
await Future.delayed(_animationController.reverseDuration! * timeDilation);
await _animationController.reverse();
setState(() {
_isDialogShown = false;
});