XSliverGridDelegate constructor
XSliverGridDelegate({})
Creates a delegate that makes grid layouts with a fixed number of tiles in the cross axis.
All of the arguments must not be null. The mainAxisSpacing
and
crossAxisSpacing
arguments must not be negative. The crossAxisCount
,
bigCellExtent
and smallCellExtent
arguments must be greater than zero
and bigCellExtent
must be greater or equal to smallCellExtent
.
Implementation
XSliverGridDelegate(
{required this.crossAxisCount,
required this.bigCellExtent,
required this.smallCellExtent,
this.mainAxisSpacing = 0.0,
this.crossAxisSpacing = 0.0,
this.isFirstCellBig = true})
: assert(crossAxisCount != null && crossAxisCount > 0),
assert(bigCellExtent != null && bigCellExtent > 0),
assert(smallCellExtent != null && smallCellExtent > 0),
assert(bigCellExtent >= smallCellExtent),
assert(mainAxisSpacing != null && mainAxisSpacing >= 0),
assert(crossAxisSpacing != null && crossAxisSpacing >= 0),
assert(isFirstCellBig != null);