RotationAnimatedWidget constructor
RotationAnimatedWidget({})
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
values : list of Rotation (degrees or rad) used for the animation,
- the first : will be the rotationDisabled value
- intermediate values : intermediate values between rotationDisabled & rotationEnabled
- the last : will be the rotationEnabled value
animationFinished : a callback called when the animation is finished
Implementation
RotationAnimatedWidget({
this.duration = const Duration(milliseconds: 500),
List<Rotation> values = const [Rotation.radians(), Rotation.radians(x: pi)],
this.enabled = true,
this.delay = const Duration(),
this.animationFinished,
this.curve = Curves.linear,
required this.child,
}) : this._values = values,
assert(values.length > 1);