AnimationStagger class
A utility class that manages staggered animations by incrementing durations.
The AnimationStagger class is designed to help create staggered animation effects by providing incrementally increasing durations for animations.
Example usage:
final stagger = AnimationStagger(Duration(milliseconds: 200));
print(stagger[1]); // 200ms
print(stagger + 2); // 600ms
print(stagger.add()); // 600ms (index = 3)
Constructors
- AnimationStagger([Duration increment = const Duration(milliseconds: 100)])
-
Creates an AnimationStagger with an optional
increment
.
Properties
Methods
-
add(
) → Duration - Returns the current stagger duration and then increments the internal index.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator +(
int value) → Duration -
Advances the internal index by
value
and returns the new duration. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → Duration -
Returns the duration for the animation at the given
index
.