Collection.builder constructor

const Collection.builder({
  1. Key? key,
  2. required Component builder(
    1. BuildContext context,
    2. int index
    )?,
  3. required int? childCount,
  4. Axis direction = Axis.vertical,
  5. double gap = 0,
  6. bool scrollable = false,
  7. String? padding,
})

Creates a Collection using a builder for dynamic child generation.

Implementation

const Collection.builder({
  super.key,
  required this.builder,
  required this.childCount,
  this.direction = Axis.vertical,
  this.gap = 0,
  this.scrollable = false,
  this.padding,
}) : children = const [];