FItemGroup.merge constructor
FItemGroup.merge({
- required List<
FItemGroupMixin> children, - FItemGroupStyle style()?,
- ScrollController? scrollController,
- double? cacheExtent,
- double maxHeight = double.infinity,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollPhysics physics = const ClampingScrollPhysics(),
- bool? enabled,
- FItemDivider divider = FItemDivider.full,
- String? semanticsLabel,
- Key? key,
Creates a FItemGroup that merges multiple FItemGroupMixins together.
All group labels will be ignored.
Implementation
FItemGroup.merge({
required List<FItemGroupMixin> children,
this.style,
this.scrollController,
this.cacheExtent,
this.maxHeight = double.infinity,
this.dragStartBehavior = DragStartBehavior.start,
this.physics = const ClampingScrollPhysics(),
this.enabled,
this.divider = FItemDivider.full,
this.semanticsLabel,
super.key,
}) : assert(0 < maxHeight, 'maxHeight ($maxHeight) must be > 0'),
_builder = ((style, enabled) => SliverMainAxisGroup(
slivers: [
for (final (index, child) in children.indexed)
FInheritedItemData.merge(
style: style.itemStyle,
spacing: style.spacing,
enabled: enabled,
dividerColor: style.dividerColor,
dividerWidth: style.dividerWidth,
divider: divider,
index: index,
last: index == children.length - 1,
child: child,
),
],
));