SliverGridDelegateWithFixedCrossAxisCount constructor
Creates a delegate that makes grid layouts with a fixed number of tiles in the cross axis.
The mainAxisSpacing
, mainAxisExtent
and crossAxisSpacing
arguments
must not be negative. The crossAxisCount
and childAspectRatio
arguments must be greater than zero.
Implementation
const SliverGridDelegateWithFixedCrossAxisCount({
required this.crossAxisCount,
this.mainAxisSpacing = 0.0,
this.crossAxisSpacing = 0.0,
this.childAspectRatio = 1.0,
this.mainAxisExtent,
}) : assert(crossAxisCount > 0),
assert(mainAxisSpacing >= 0),
assert(crossAxisSpacing >= 0),
assert(childAspectRatio > 0),
assert(mainAxisExtent == null || mainAxisExtent >= 0);