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