insertDuration property
The duration of the animation when an item is inserted into the list.
This property defines the default duration for all animations applied to items
when they are added to the list. If you provide a specific duration for each
AnimationEffect in the enterTransition list, the insertDuration
override the durations of all animations in the enterTransition.
Usage:
- If
insertDurationis provided, it will override all durations specified in the enterTransition list. - If
insertDurationis not provided, the individual durations defined in enterTransition will be used instead. - If neither
insertDurationnor individual durations are specified, a default duration (e.g.,const Duration(milliseconds: 300)) will be used.
Example:
AnimatedReorderableListView(
insertDuration: Duration(milliseconds: 500), // Default duration for item insertions.
enterTransition: [
FadeIn(duration: Duration(milliseconds: 300)), // Overrides the default for this effect.
SlideInLeft(), // Will use the default duration from `insertDuration`.
],
);
insertDuration
Implementation
final Duration? insertDuration;