GridViewBuilder constructor

const GridViewBuilder({
  1. Key? key,
  2. required double ratio,
  3. required int crossAxisCount,
  4. required int itemCount,
  5. required Widget builder(
    1. BuildContext context,
    2. int index
    ),
  6. EdgeInsetsGeometry? padding,
  7. bool? shrinkWrap,
  8. ScrollPhysics? physics,
  9. bool? reverse,
  10. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  11. ScrollController? controller,
})

Constructor for GridViewBuilder

  • key: An optional key to identify the widget.
  • ratio: The aspect ratio of items in the GridView.
  • crossAxisCount: The number of items to be displayed in each row.
  • itemCount: The total number of items in the GridView.
  • builder: A function that builds individual items based on the index.

Implementation

const GridViewBuilder({
  Key? key,
  required this.ratio,
  required this.crossAxisCount,
  required this.itemCount,
  required this.builder,
  this.padding,
  this.shrinkWrap,
  this.physics,
  this.reverse,
  this.keyboardDismissBehavior, this.controller,
}) : super(key: key);