StaggeredGrid.count constructor

StaggeredGrid.count({
  1. Key? key,
  2. required int crossAxisCount,
  3. double mainAxisSpacing = 0,
  4. double crossAxisSpacing = 0,
  5. AxisDirection? axisDirection,
  6. List<Widget> children = const <Widget>[],
})

Creates a StaggeredGrid using a custom StaggeredGridDelegateWithFixedCrossAxisCount as delegate.

The grid will have a fixed number of tiles in the cross axis.

Implementation

StaggeredGrid.count({
  Key? key,
  required int crossAxisCount,
  double mainAxisSpacing = 0,
  double crossAxisSpacing = 0,
  AxisDirection? axisDirection,
  List<Widget> children = const <Widget>[],
}) : this.custom(
        key: key,
        delegate: StaggeredGridDelegateWithFixedCrossAxisCount(
          crossAxisCount: crossAxisCount,
        ),
        mainAxisSpacing: mainAxisSpacing,
        crossAxisSpacing: crossAxisSpacing,
        axisDirection: axisDirection,
        children: children,
      );