ScaleAnimatedWidget constructor

ScaleAnimatedWidget({
  1. Widget? child,
  2. Duration delay = const Duration(),
  3. Curve curve = Curves.linear,
  4. Duration duration = const Duration(seconds: 2),
  5. dynamic animationFinished(
    1. bool
    )?,
  6. bool enabled = false,
  7. List<double> values = const [0, 1],
})

A scale animation using 2-* values

duration : the duration of the animation, including intermediate values enabled : determine if the animation is stopped or fired curve : An easing curve, see Curve

values : list of double used for the animation,

  • the first : will be the scaleDisabled value
  • intermediate values : intermediate values between scaleDisabled & scaleEnabled
  • the last : will be the scaleEnabled value

animationFinished : a callback called when the animation is finished

Implementation

ScaleAnimatedWidget({
  this.child,
  this.delay = const Duration(),
  this.curve = Curves.linear,
  this.duration = const Duration(seconds: 2),
  this.animationFinished,
  this.enabled = false,
  List<double> values = const [0, 1],
})  : this._values = values,
      assert(values.length > 1);