removeDuration property
The duration of the animation when an item is removed from the list.
This property defines the default duration for all animations applied to items
when they are removed from the list. If you provide a specific duration for each
AnimationEffect in the exitTransition
list, the removeDuration
override the durations of all animations in the exitTransition.
Usage:
- If
removeDuration
is specified, it will be applied as the default duration for the removal animation of items. - If specific durations are provided for individual
AnimationEffect
s, they take precedence. - If neither
removeDuration
nor individual durations are specified, a default duration (e.g.,const Duration(milliseconds: 300)
) may be used.
Example:
AnimatedReorderableGridView(
removeDuration: Duration(milliseconds: 400), // Default duration for item removals.
exitTransition: [
FadeOut(duration: Duration(milliseconds: 200)), // Overrides the default for this effect.
SlideOutRight(), // Will use the default duration from `removeDuration`.
],
);
removeDuration
is overridden by the duration specified in the exitTransition
.
Implementation
final Duration? removeDuration;