ExtendedSliverGrid.count constructor

ExtendedSliverGrid.count({
  1. Key? key,
  2. required int crossAxisCount,
  3. double mainAxisSpacing = 0.0,
  4. double crossAxisSpacing = 0.0,
  5. double childAspectRatio = 1.0,
  6. List<Widget> children = const <Widget>[],
  7. required ExtendedListDelegate extendedListDelegate,
})

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:

  • new GridView.count, the equivalent constructor for GridView widgets.

Implementation

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