CurvedAnimationController<T>.tween constructor

CurvedAnimationController<T>.tween(
  1. Tween<Object?> tween,
  2. Duration? duration, {
  3. Curve curve = Curves.linear,
  4. Curve? reverseCurve = Curves.linear,
  5. Duration? reverseDuration,
  6. String? debugLabel,
  7. AnimationBehavior animationBehavior = AnimationBehavior.normal,
  8. required TickerProvider vsync,
})

Implementation

CurvedAnimationController.tween(
  Tween tween,
  this.duration, {
  this.curve = Curves.linear,
  this.reverseCurve = Curves.linear,
  this.reverseDuration,
  this.debugLabel,
  this.animationBehavior = AnimationBehavior.normal,
  required this.vsync,
}) {
  _tween = tween;

  _controller = AnimationController(
    vsync: vsync,
    debugLabel: debugLabel,
    animationBehavior: animationBehavior,
    reverseDuration: reverseDuration,
    duration: duration,
  );

  _animation = _tween!.animate(CurvedAnimation(
    parent: _controller,
    curve: curve,
    reverseCurve: reverseCurve,
  ));
}