ResilientAnimationController.unbounded constructor
ResilientAnimationController.unbounded({
- bool broadcast = false,
- double value = 0.0,
- Duration? duration,
- Duration? reverseDuration,
- String? debugLabel,
- required TickerProvider vsync,
- AnimationBehavior animationBehavior = AnimationBehavior.preserve,
Creates a resilient animation controller with unbounded limits.
Unbounded controllers have lowerBound set to double.negativeInfinity and upperBound set to double.infinity.
broadcast: Whether to broadcast updates to multiple subscribers. Defaults tofalse.value: The initial value of the animation. Defaults to0.0.duration: The length of time this animation should last.reverseDuration: The length of time this animation should last when going in reverse.debugLabel: A label used to identify this animation in debug output.vsync: The TickerProvider for driving the animation ticker.animationBehavior: The behavior when animations are disabled by system settings. Defaults to AnimationBehavior.preserve.
Ensures:
- Initializes in a dormant state (
_DormantAnimationControlDelegate) with infinite bounds.
Example:
final controller = ResilientAnimationController.unbounded(
value: 10.0,
vsync: vsyncProvider,
);
Implementation
ResilientAnimationController.unbounded({
this.broadcast = false,
double value = 0.0,
Duration? duration,
Duration? reverseDuration,
this.debugLabel,
required this.vsync,
this.animationBehavior = AnimationBehavior.preserve,
}) : lowerBound = double.negativeInfinity,
upperBound = double.infinity {
assert(debugMaybeDispatchCreated('animation', 'AnimationController', this));
_delegate = _DormantAnimationControlDelegate(
value: value,
duration: duration,
reverseDuration: reverseDuration,
lowerBound: lowerBound,
upperBound: upperBound,
onValueOrDurationChanged: notifyListeners,
);
}