Browse Source

fix: setState

pull/43/head
AmirrezaChegini 1 week ago
parent
commit
8d228998a4
  1. 2
      lib/core/widgets/animations/globe_animation.dart

2
lib/core/widgets/animations/globe_animation.dart

@ -41,6 +41,7 @@ class _GlobeAnimationState extends State<GlobeAnimation>
_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<GlobeAnimation>
_timer?.cancel();
_timer = null;
_controller.stop();
if (!mounted) return;
setState(() {
_gradient = RadialGradient(
colors: [

Loading…
Cancel
Save