FItemGroup constructor

FItemGroup({
  1. required List<FItemMixin> children,
  2. FItemGroupStyle style(
    1. FItemGroupStyle
    )?,
  3. ScrollController? scrollController,
  4. double? cacheExtent,
  5. double maxHeight = double.infinity,
  6. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  7. ScrollPhysics physics = const ClampingScrollPhysics(),
  8. bool? enabled,
  9. FItemDivider divider = FItemDivider.none,
  10. String? semanticsLabel,
  11. Key? key,
})

Creates a FItemGroup.

Implementation

FItemGroup({
  required List<FItemMixin> children,
  this.style,
  this.scrollController,
  this.cacheExtent,
  this.maxHeight = double.infinity,
  this.dragStartBehavior = DragStartBehavior.start,
  this.physics = const ClampingScrollPhysics(),
  this.enabled,
  this.divider = FItemDivider.none,
  this.semanticsLabel,
  super.key,
}) : assert(0 < maxHeight, 'maxHeight ($maxHeight) must be > 0'),
     _builder = ((style, enabled) => SliverList.list(
       children: [
         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,
           ),
       ],
     ));