SliverGridDelegateWithMaxCrossAxisExtent constructor

const SliverGridDelegateWithMaxCrossAxisExtent({@required double maxCrossAxisExtent, double mainAxisSpacing: 0.0, double crossAxisSpacing: 0.0, double childAspectRatio: 1.0 })

Creates a delegate that makes grid layouts with tiles that have a maximum cross-axis extent.

All of the arguments must not be null. The maxCrossAxisExtent and mainAxisSpacing, and crossAxisSpacing arguments must not be negative. The childAspectRatio argument must be greater than zero.

Implementation

const SliverGridDelegateWithMaxCrossAxisExtent({
  @required this.maxCrossAxisExtent,
  this.mainAxisSpacing = 0.0,
  this.crossAxisSpacing = 0.0,
  this.childAspectRatio = 1.0,
}) : assert(maxCrossAxisExtent != null && maxCrossAxisExtent >= 0),
     assert(mainAxisSpacing != null && mainAxisSpacing >= 0),
     assert(crossAxisSpacing != null && crossAxisSpacing >= 0),
     assert(childAspectRatio != null && childAspectRatio > 0);