DurableAnimationController.unbounded constructor
DurableAnimationController.unbounded({
- DurabilityPolicy policy = DurabilityPolicy.resume,
- double value = 0.0,
- Duration? duration,
- Duration? reverseDuration,
- String? debugLabel,
- AnimationBehavior animationBehavior = AnimationBehavior.preserve,
- DateTime clock() = DateTime.now,
Creates a state-durable animation controller with unbounded limits.
policy: The timeline durability policy across dormant deactivations. Defaults to DurabilityPolicy.resume.value: Initial value of the animation. Defaults to0.0.duration: Forward animation duration.reverseDuration: Reverse animation duration.debugLabel: Diagnostic label for debugging output.animationBehavior: Accessibility behavior override. Defaults to AnimationBehavior.preserve.clock: Timestamp supplier used whenpolicyis DurabilityPolicy.catchUp. Defaults to DateTime.now.
Ensures:
- Returns an unbounded DurableAnimationController where lowerBound is double.negativeInfinity and upperBound is double.infinity.
Implementation
factory DurableAnimationController.unbounded({
DurabilityPolicy policy = DurabilityPolicy.resume,
double value = 0.0,
Duration? duration,
Duration? reverseDuration,
String? debugLabel,
AnimationBehavior animationBehavior = AnimationBehavior.preserve,
DateTime Function() clock = DateTime.now,
}) {
return switch (policy) {
DurabilityPolicy.resume => _FrozenAnimationController.unbounded(
value: value,
duration: duration,
reverseDuration: reverseDuration,
debugLabel: debugLabel,
animationBehavior: animationBehavior,
frozen: true,
),
DurabilityPolicy.catchUp => _CatchUpAnimationController.unbounded(
value: value,
duration: duration,
reverseDuration: reverseDuration,
debugLabel: debugLabel,
animationBehavior: animationBehavior,
clock: clock,
),
DurabilityPolicy.reset => _FrozenAnimationController.unbounded(
value: value,
duration: duration,
reverseDuration: reverseDuration,
debugLabel: debugLabel,
animationBehavior: animationBehavior,
frozen: false,
),
};
}