CustomAnimatedWidget constructor

CustomAnimatedWidget({
  1. Duration duration = const Duration(milliseconds: 500),
  2. required CustomBuilder builder,
  3. bool enabled = true,
  4. Duration delay = const Duration(),
  5. dynamic animationFinished(
    1. bool
    )?,
  6. Curve curve = Curves.linear,
})

A custom animation using a builder

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

builder : called at each tick to provide the animated widget, giving the actual percentage (0.0 - 1.0)

animationFinished : a callback called when the animation is finished

Implementation

CustomAnimatedWidget({
  this.duration = const Duration(milliseconds: 500),
  required this.builder,
  this.enabled = true,
  this.delay = const Duration(),
  this.animationFinished,
  this.curve = Curves.linear,
});