TranslationAnimatedWidget constructor
TranslationAnimatedWidget({})
An translation animation using 2-* values
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 Offset used for the animation,
- the first : will be the translationDisabled value
- intermediate values : intermediate values between translationDisabled & translationEnabled
- the last : will be the translationEnabled value
animationFinished : a callback called when the animation is finished
Implementation
TranslationAnimatedWidget({
this.duration = const Duration(milliseconds: 500),
this.delay = const Duration(),
List<Offset> values = const [Offset(0, 0), Offset(0, 200)],
this.enabled = true,
this.curve = Curves.linear,
this.animationFinished,
required this.child,
}) : this._values = values,
assert(values.length > 1);