SliverListGrid.builder constructor

const SliverListGrid.builder({
  1. Key? key,
  2. required IndexedWidgetBuilder? itemBuilder,
  3. IndexedWidgetBuilder? separatorBuilder,
  4. int? itemCount,
  5. GridStyle gridStyle = GridStyle.none,
  6. int crossAxisCount = 1,
  7. double? maxCrossAxisExtent,
  8. double mainAxisSpacing = 0,
  9. double crossAxisSpacing = 0,
  10. double childAspectRatio = 1,
  11. double? mainAxisExtent,
  12. ChildIndexGetter? findChildIndexCallback,
  13. SemanticIndexCallback semanticIndexCallback = kDefaultSemanticIndexCallback,
  14. double? itemExtent,
  15. Widget? prototypeItem,
  16. bool addAutomaticKeepALives = true,
  17. bool addRepaintBoundaries = true,
  18. bool addSemanticIndexes = true,
  19. 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;