CustomAnimation<T> constructor

const CustomAnimation<T>({
  1. required AnimatedWidgetBuilder<T> builder,
  2. required Animatable<T> tween,
  3. CustomAnimationControl control = CustomAnimationControl.play,
  4. Curve curve = Curves.linear,
  5. Duration duration = const Duration(seconds: 1),
  6. Duration delay = Duration.zero,
  7. double startPosition = 0.0,
  8. Widget? child,
  9. AnimationStatusListener? animationStatusListener,
  10. int? fps,
  11. bool developerMode = false,
  12. Key? key,
})

Creates a new CustomAnimation widget. See class documentation for more information.

Implementation

const CustomAnimation({
  required this.builder,
  required this.tween,
  this.control = CustomAnimationControl.play,
  this.curve = Curves.linear,
  this.duration = const Duration(seconds: 1),
  this.delay = Duration.zero,
  this.startPosition = 0.0,
  this.child,
  this.animationStatusListener,
  this.fps,
  this.developerMode = false,
  Key? key,
})  : assert(startPosition >= 0 && startPosition <= 1,
          'The property startPosition must have a value between 0.0 and 1.0.'),
      super(key: key);