ScaleAnimatedWidget.tween constructor

ScaleAnimatedWidget.tween({
  1. Duration duration = const Duration(milliseconds: 500),
  2. double scaleEnabled = 1,
  3. double scaleDisabled = 0,
  4. bool enabled = true,
  5. dynamic animationFinished(
    1. bool
    )?,
  6. Curve curve = Curves.linear,
  7. required Widget child,
})

An scale 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

scaleDisabled : the default value of the widget scaleEnabled : the animated value of the widget

animationFinished : a callback called when the animation is finished

Implementation

ScaleAnimatedWidget.tween({
  Duration duration = const Duration(milliseconds: 500),
  double scaleEnabled = 1,
  double scaleDisabled = 0,
  bool enabled = true,
  Function(bool)? animationFinished,
  Curve curve = Curves.linear,
  required Widget child,
}) : this(
          duration: duration,
          enabled: enabled,
          curve: curve,
          child: child,
          animationFinished: animationFinished,
          values: [scaleDisabled, scaleEnabled]);