@@ -118,7 +118,7 @@ class _GFAnimationState extends State<GFAnimation>
118118 if (widget.type == GFAnimationType .rotateTransition) {
119119 controller = widget.controller ??
120120 AnimationController (
121- duration: widget.duration ?? const Duration (seconds: 2 ));
121+ duration: widget.duration ?? const Duration (seconds: 2 ), vsync : this );
122122 animation = widget.turnsAnimation ??
123123 Tween <double >(begin: 0 , end: 20 ).animate (controller);
124124 if (widget.turnsAnimation == null ) {
@@ -127,14 +127,14 @@ class _GFAnimationState extends State<GFAnimation>
127127 } else if (widget.type == GFAnimationType .scaleTransition) {
128128 controller = widget.controller ??
129129 AnimationController (
130- duration: widget.duration ?? const Duration (seconds: 2 ));
130+ duration: widget.duration ?? const Duration (seconds: 2 ), vsync : this );
131131 animation = widget.scaleAnimation ??
132132 CurvedAnimation (
133133 parent: controller, curve: widget.curve ?? Curves .ease);
134134 controller.forward ();
135135 } else if (widget.type == GFAnimationType .slideTransition) {
136136 controller = AnimationController (
137- duration: widget.duration ?? const Duration (seconds: 2 ),
137+ duration: widget.duration ?? const Duration (seconds: 2 ), vsync : this
138138 )..repeat (reverse: true );
139139 offsetAnimation = Tween <Offset >(
140140 begin: Offset .zero,
@@ -252,7 +252,7 @@ class _GFAnimationState extends State<GFAnimation>
252252 fontWeight: widget.fontWeight ?? FontWeight .normal,
253253 fontSize: widget.fontSize ?? 16 ,
254254 color: widget.color ?? Colors .blue),
255- textWidthBasis: widget.textWidthBasis ?? TextWidthBasis .parent,
255+ // textWidthBasis: widget.textWidthBasis ?? TextWidthBasis.parent,
256256 textAlign: widget.textAlign ?? TextAlign .start,
257257 curve: widget.curve ?? Curves .linear,
258258 duration: widget.duration ?? const Duration (seconds: 2 ),
0 commit comments