diff --git a/lib/core/widgets/animations/globe_animation.dart b/lib/core/widgets/animations/globe_animation.dart index a020320..4911704 100644 --- a/lib/core/widgets/animations/globe_animation.dart +++ b/lib/core/widgets/animations/globe_animation.dart @@ -41,6 +41,7 @@ class _GlobeAnimationState extends State _controller.repeat(reverse: true); _timer = Timer.periodic(Duration(seconds: 1), (timer) { if (_gradient == null) { + if (!mounted) return; setState(() { _gradient = RadialGradient( colors: [ @@ -61,6 +62,7 @@ class _GlobeAnimationState extends State _timer?.cancel(); _timer = null; _controller.stop(); + if (!mounted) return; setState(() { _gradient = RadialGradient( colors: [