RotationAnimatedWidget.tween constructor
RotationAnimatedWidget.tween({
- Duration duration = const Duration(milliseconds: 500),
- Rotation rotationEnabled = const Rotation.radians(),
- Rotation rotationDisabled = const Rotation.radians(x: pi),
- bool enabled = true,
- Duration delay = const Duration(),
- dynamic animationFinished()?,
- Curve curve = Curves.linear,
- required Widget child,
An rotation animation using 2 values : enabled - disabled
Rotations can be
- in in radians or degrees
- in axis X, Y, Z
duration : the duration of the animation, including intermediate values delay : the delay before the animation starts enabled : determine if the animation is stopped or fired curve : An easing curve, see Curve
rotationDisabled : the default value of the widget (see Rotation) rotationEnabled : the animated value of the widget (see Rotation)
animationFinished : a callback called when the animation is finished
Implementation
RotationAnimatedWidget.tween({
Duration duration = const Duration(milliseconds: 500),
Rotation rotationEnabled = const Rotation.radians(),
Rotation rotationDisabled = const Rotation.radians(x: pi),
bool enabled = true,
Duration delay = const Duration(),
Function(bool)? animationFinished,
Curve curve = Curves.linear,
required Widget child,
}) : this(
duration: duration,
enabled: enabled,
curve: curve,
delay: delay,
child: child,
animationFinished: animationFinished,
values: [rotationDisabled, rotationEnabled]);