AnimationController.unbounded constructor
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 TickerProvider for the current context. It can be changed by calling resync. It is required and must not be null. 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.debugLabel,
@required TickerProvider vsync,
this.animationBehavior = AnimationBehavior.preserve,
}) : assert(value != null),
assert(vsync != null),
lowerBound = double.negativeInfinity,
upperBound = double.infinity,
_direction = _AnimationDirection.forward {
_ticker = vsync.createTicker(_tick);
_internalSetValue(value);
}