drive method
Binds this timeline to an AnimationController.
Parameters
controller- The animation controller to drive this timeline. Must have a non-null duration.
Returns
A TimelineAnimatable that can be used with the controller.
Example
final controller = AnimationController(
vsync: this,
duration: Duration(seconds: 1),
);
final animatable = timeline.drive(controller);
Implementation
TimelineAnimatable<T> drive(AnimationController controller) {
return TimelineAnimatable(controller.duration!, this);
}