FItemGroup constructor
FItemGroup({
- required List<
FItemMixin> children, - FItemGroupStyleDelta style = const .context(),
- ScrollController? scrollController,
- double? cacheExtent,
- double maxHeight = .infinity,
- DragStartBehavior dragStartBehavior = .start,
- ScrollPhysics physics = const ClampingScrollPhysics(),
- bool? enabled,
- bool? intrinsicWidth,
- FItemDivider divider = .none,
- String? semanticsLabel,
- Key? key,
Creates a FItemGroup.
Implementation
FItemGroup({
required List<FItemMixin> children,
this.style = const .context(),
this.scrollController,
this.cacheExtent,
this.maxHeight = .infinity,
this.dragStartBehavior = .start,
this.physics = const ClampingScrollPhysics(),
this.enabled,
this.intrinsicWidth,
this.divider = .none,
this.semanticsLabel,
super.key,
}) : assert(0 < maxHeight, 'maxHeight ($maxHeight) must be > 0'),
_builder = ((style, enabled, intrinsicWidth) {
final nested = [
for (final (index, child) in children.indexed)
FInheritedItemData.merge(
styles: style.itemStyles,
spacing: style.spacing,
enabled: enabled,
intrinsicWidth: intrinsicWidth,
dividerColor: style.dividerColor,
dividerWidth: style.dividerWidth,
divider: divider,
index: index,
last: index == children.length - 1,
child: child,
),
];
return intrinsicWidth ? Column(mainAxisSize: .min, children: nested) : SliverList.list(children: nested);
});