SizeAnimatedWidget.tween constructor
SizeAnimatedWidget.tween({})
An size animation using 2 values : enabled - disabled
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
sizeDisabled : the default value of the widget sizeEnabled : the animated value of the widget
animationFinished : a callback called when the animation is finished
Implementation
SizeAnimatedWidget.tween({
Duration duration = const Duration(milliseconds: 500),
Duration delay = const Duration(milliseconds: 500),
Size sizeEnabled = const Size(100, 100),
Size sizeDisabled = const Size(0, 0),
bool enabled = true,
Function(bool)? animationFinished,
Curve curve = Curves.linear,
required Widget child,
}) : this(
duration: duration,
enabled: enabled,
curve: curve,
child: child,
delay: delay,
animationFinished: animationFinished,
values: [sizeDisabled, sizeEnabled],
);