AnimationController.unbounded constructor
- double value = 0.0,
- Duration? duration,
- Duration? reverseDuration,
- String? debugLabel,
- required TickerProvider vsync,
- AnimationBehavior animationBehavior = AnimationBehavior.preserve,
Creates an animation controller with no upper or lower bound for its value.
-
value
is the initial value of the animation. -
duration is the length of time this animation should last.
-
debugLabel is a string to help identify this animation during debugging (used by toString).
-
vsync
is the required TickerProvider for the current context. It can be changed by calling resync. See TickerProvider for advice on obtaining a ticker provider.
This constructor is most useful for animations that will be driven using a physics simulation, especially when the physics simulation has no pre-determined bounds.
Implementation
AnimationController.unbounded({
double value = 0.0,
this.duration,
this.reverseDuration,
this.debugLabel,
required TickerProvider vsync,
this.animationBehavior = AnimationBehavior.preserve,
}) : lowerBound = double.negativeInfinity,
upperBound = double.infinity,
_direction = _AnimationDirection.forward {
if (kFlutterMemoryAllocationsEnabled) {
_maybeDispatchObjectCreation();
}
_ticker = vsync.createTicker(_tick);
_internalSetValue(value);
}