SliverListGrid.count constructor
const
SliverListGrid.count({
- Key? key,
- required List<
Widget> ? children, - GridStyle gridStyle = GridStyle.none,
- int crossAxisCount = 1,
- double? maxCrossAxisExtent,
- double mainAxisSpacing = 0,
- double crossAxisSpacing = 0,
- double childAspectRatio = 1,
- double? mainAxisExtent,
- SemanticIndexCallback semanticIndexCallback = kDefaultSemanticIndexCallback,
- double? itemExtent,
- Widget? prototypeItem,
- bool addAutomaticKeepALives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- Widget placeholder = const PlaceholderChild(),
Implementation
const SliverListGrid.count({
super.key,
required this.children,
this.gridStyle = GridStyle.none,
this.crossAxisCount = 1,
this.maxCrossAxisExtent,
this.mainAxisSpacing = 0,
this.crossAxisSpacing = 0,
this.childAspectRatio = 1,
this.mainAxisExtent,
this.semanticIndexCallback = kDefaultSemanticIndexCallback,
this.itemExtent,
this.prototypeItem,
this.addAutomaticKeepALives = true,
this.addRepaintBoundaries = true,
this.addSemanticIndexes = true,
this.placeholder = const PlaceholderChild(),
}) : assert(children != null),
assert(gridStyle != GridStyle.aligned),
itemBuilder = null,
itemCount = null,
separatorBuilder = null,
findChildIndexCallback = null;