SliverStaggeredGridDelegate constructor

const SliverStaggeredGridDelegate({
  1. required IndexedStaggeredTileBuilder staggeredTileBuilder,
  2. double mainAxisSpacing = 0,
  3. double crossAxisSpacing = 0,
  4. int? staggeredTileCount,
})

Creates a delegate that makes staggered grid layouts

All of the arguments must not be null. The mainAxisSpacing and crossAxisSpacing arguments must not be negative.

Implementation

const SliverStaggeredGridDelegate({
  required this.staggeredTileBuilder,
  this.mainAxisSpacing = 0,
  this.crossAxisSpacing = 0,
  this.staggeredTileCount,
})  : assert(mainAxisSpacing >= 0),
      assert(crossAxisSpacing >= 0);