GridView.custom constructor

const GridView.custom({
  1. Key? key,
  2. Axis scrollDirection = Axis.vertical,
  3. bool reverse = false,
  4. ScrollController? controller,
  5. bool? primary,
  6. ScrollPhysics? physics,
  7. bool shrinkWrap = false,
  8. EdgeInsetsGeometry? padding,
  9. required SliverGridDelegate gridDelegate,
  10. required SliverChildDelegate childrenDelegate,
  11. double? cacheExtent,
  12. int? semanticChildCount,
  13. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  14. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  15. String? restorationId,
  16. Clip clipBehavior = Clip.hardEdge,
  17. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
})

Creates a scrollable, 2D array of widgets with both a custom SliverGridDelegate and a custom SliverChildDelegate.

To use an IndexedWidgetBuilder callback to build children, either use a SliverChildBuilderDelegate or use the GridView.builder constructor.

Implementation

const GridView.custom({
  super.key,
  super.scrollDirection,
  super.reverse,
  super.controller,
  super.primary,
  super.physics,
  super.shrinkWrap,
  super.padding,
  required this.gridDelegate,
  required this.childrenDelegate,
  super.cacheExtent,
  super.semanticChildCount,
  super.dragStartBehavior,
  super.keyboardDismissBehavior,
  super.restorationId,
  super.clipBehavior,
  super.hitTestBehavior,
});