SliverGrid.count constructor

SliverGrid.count({Key key, @required int crossAxisCount, double mainAxisSpacing: 0.0, double crossAxisSpacing: 0.0, double childAspectRatio: 1.0, List<Widget> children: const [] })

Creates a sliver that places multiple box children in a two dimensional arrangement with a fixed number of tiles in the cross axis.

Uses a SliverGridDelegateWithFixedCrossAxisCount as the gridDelegate, and a SliverChildListDelegate as the delegate.

See also:

Implementation

SliverGrid.count({
  Key key,
  @required int crossAxisCount,
  double mainAxisSpacing = 0.0,
  double crossAxisSpacing = 0.0,
  double childAspectRatio = 1.0,
  List<Widget> children = const <Widget>[],
}) : gridDelegate = SliverGridDelegateWithFixedCrossAxisCount(
       crossAxisCount: crossAxisCount,
       mainAxisSpacing: mainAxisSpacing,
       crossAxisSpacing: crossAxisSpacing,
       childAspectRatio: childAspectRatio,
     ),
     super(key: key, delegate: SliverChildListDelegate(children));