AnimationConfigurationClass.staggeredGrid constructor

const AnimationConfigurationClass.staggeredGrid({
  1. Key? key,
  2. required int position,
  3. Duration duration = const Duration(milliseconds: 225),
  4. Duration? delay,
  5. required int columnCount,
  6. required Widget child,
})

Configure the children's animation to be staggered.

A staggered animation consists of sequential or overlapping animations.

Each child animation will start with a delay based on its position comparing to previous children.

The staggering effect will be based on a dual-axis (from left to right and top to bottom).

Use this named constructor to display a staggered animation on a dual-axis list of widgets (GridView...).

The position argument must not be null.

Default value for duration is 225ms.

Default value for delay is the duration divided by 6 (appropriate factor to keep coherence during the animation).

The columnCount argument must not be null and must be greater than 0.

The child argument must not be null.

Implementation

const AnimationConfigurationClass.staggeredGrid({
  Key? key,
  required this.position,
  this.duration = const Duration(milliseconds: 225),
  this.delay,
  required this.columnCount,
  required Widget child,
}) : super(key: key, child: child);