SliverListGrid.count constructor

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