AnimatedValueBuilder<T>.animation constructor

const AnimatedValueBuilder<T>.animation({
  1. Key? key,
  2. T? initialValue,
  3. required T value,
  4. Duration? duration,
  5. Duration durationBuilder(
    1. T a,
    2. T b
    )?,
  6. required AnimationBuilder<T> builder,
  7. void onEnd(
    1. T value
    )?,
  8. Curve curve = Curves.linear,
  9. T lerp(
    1. T a,
    2. T b,
    3. double t
    )?,
})

Implementation

const AnimatedValueBuilder.animation({
  super.key,
  this.initialValue,
  required this.value,
  this.duration,
  this.durationBuilder,
  required AnimationBuilder<T> builder,
  this.onEnd,
  this.curve = Curves.linear,
  this.lerp,
})  : builder = null,
      animationBuilder = builder,
      child = null,
      assert(duration != null || durationBuilder != null,
          'You must provide a duration or a durationBuilder.');