SliverGrid.extent constructor

SliverGrid.extent({
  1. Key? key,
  2. required double maxCrossAxisExtent,
  3. double mainAxisSpacing = 0.0,
  4. double crossAxisSpacing = 0.0,
  5. double childAspectRatio = 1.0,
  6. List<Widget> children = const <Widget>[],
})

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:

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));