TweenAnimationBuilder<T extends Object?> constructor Null safety

const TweenAnimationBuilder<T extends Object?>(
  1. {Key? key,
  2. required Tween<T> tween,
  3. required Duration duration,
  4. Curve curve = Curves.linear,
  5. required ValueWidgetBuilder<T> builder,
  6. VoidCallback? onEnd,
  7. Widget? child}
)

Creates a TweenAnimationBuilder.

The properties tween, duration, and builder are required. The values for tween, curve, and builder must not be null.

The TweenAnimationBuilder takes full ownership of the provided tween instance and mutates it. Once a Tween has been passed to a TweenAnimationBuilder, its properties should not be accessed or changed anymore to avoid interference with the TweenAnimationBuilder.

Implementation

const TweenAnimationBuilder({
  super.key,
  required this.tween,
  required super.duration,
  super.curve,
  required this.builder,
  super.onEnd,
  this.child,
}) : assert(tween != null),
     assert(curve != null),
     assert(builder != null);