insertDuration property

Duration? insertDuration
final

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 insertDuration is provided, it will override all durations specified in the enterTransition list.
  • If insertDuration is not provided, the individual durations defined in enterTransition will be used instead.
  • If neither insertDuration nor individual durations are specified, a default duration (e.g., const Duration(milliseconds: 300)) will be used.

Example:

AnimatedReorderableGridView(
  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;