summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/presentation/screens/dashboard/widgets/dashboard_content.dart5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/presentation/screens/dashboard/widgets/dashboard_content.dart b/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
index 7e4c469..1d25fdf 100644
--- a/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
+++ b/lib/presentation/screens/dashboard/widgets/dashboard_content.dart
@@ -15,7 +15,7 @@ class DashBoardState extends ConsumerState<DashBoard>
late AnimationController _animationController;
late Animation<double> _animation;
static bool _isAnimationPlayed = false;
- late Timer timer;
+ Timer? timer = null;
@override
void initState() {
@@ -53,7 +53,8 @@ class DashBoardState extends ConsumerState<DashBoard>
@override
void dispose() {
_animationController.dispose();
- timer.cancel();
+ if (timer != null)
+ timer?.cancel();
super.dispose();
}