AnimationBehavior enum Null safety

Configures how an AnimationController behaves when animations are disabled.

When AccessibilityFeatures.disableAnimations is true, the device is asking Flutter to reduce or disable animations as much as possible. To honor this, we reduce the duration and the corresponding number of frames for animations. This enum is used to allow certain AnimationControllers to opt out of this behavior.

For example, the AnimationController which controls the physics simulation for a scrollable list will have AnimationBehavior.preserve, so that when a user attempts to scroll it does not jump to the end/beginning too quickly.

Inheritance

Constructors

AnimationBehavior()
const

Values

normal → const AnimationBehavior

The AnimationController will reduce its duration when AccessibilityFeatures.disableAnimations is true.

AnimationBehavior()
preserve → const AnimationBehavior

The AnimationController will preserve its behavior.

This is the default for repeating animations in order to prevent them from flashing rapidly on the screen if the widget does not take the AccessibilityFeatures.disableAnimations flag into account.

AnimationBehavior()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<AnimationBehavior>
A constant List of the values in this enum, in order of their declaration.
[normal, preserve]