resetAnimation method
void
resetAnimation({
- Tween<
T> ? tween, - Map<
String, Tween< ? tweenMap,Object?> > - Duration? duration,
- Curve? curve,
- int? repeats,
- int? cycles,
override
The state of Animator widget.
From the parameter defined in the Animator widget, it instantiates the animation.
Implementation
@override
void resetAnimation({
Tween<T>? tween,
Map<String, Tween>? tweenMap,
Duration? duration,
Curve? curve,
int? repeats,
int? cycles,
}) {
if (tween != null) {
_animation = null;
_tween = tween;
}
if (tweenMap != null) {
_animationMap.clear();
_tweenMap = tweenMap;
}
if (curve != null) {
_animation = null;
}
injected.resetAnimation(
duration: duration,
curve: curve,
repeats: repeats ?? cycles,
shouldReverseRepeats: repeats != null
? false
: cycles != null
? true
: null,
);
}