SliverGrid.extent constructor
Creates a sliver that places multiple box children in a two dimensional arrangement with tiles that each have a maximum cross-axis extent.
Uses a SliverGridDelegateWithMaxCrossAxisExtent as the gridDelegate, and a SliverChildListDelegate as the delegate.
See also:
- GridView.extent, the equivalent constructor for GridView widgets.
Implementation
SliverGrid.extent({
super.key,
required double maxCrossAxisExtent,
double mainAxisSpacing = 0.0,
double crossAxisSpacing = 0.0,
double childAspectRatio = 1.0,
List<Widget> children = const <Widget>[],
}) : gridDelegate = SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: maxCrossAxisExtent,
mainAxisSpacing: mainAxisSpacing,
crossAxisSpacing: crossAxisSpacing,
childAspectRatio: childAspectRatio,
),
super(delegate: SliverChildListDelegate(children));