GroupedListView<T, E> constructor
const
GroupedListView<T, E> ({
- Key? key,
- required List<
T> elements, - required E groupBy(
- T element
- int groupComparator(
- E value1,
- E value2
- Widget groupSeparatorBuilder(
- E value
- Widget groupHeaderBuilder(
- T element
- Widget itemBuilder(
- BuildContext context,
- int element
- Widget indexedItemBuilder(
- BuildContext context,
- T element,
- int index
- int itemComparator(
- T element1,
- T element2
- GroupedListOrder order = GroupedListOrder.asc,
- bool sort = true,
- bool useStickyGroupSeparators = false,
- Widget separator = const SizedBox.shrink(),
- bool floatingHeader = false,
- Color stickyHeaderBackgroundColor = const Color(0xffF7F7F7),
- Axis scrollDirection = Axis.vertical,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics? physics,
- bool shrinkWrap = false,
- EdgeInsetsGeometry? padding,
- bool reverse = false,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- double? cacheExtent,
- Clip clipBehavior = Clip.hardEdge,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- String? restorationId,
- int? semanticChildCount,
- double? itemExtent,
- RefreshCallback? onRefresh,
Creates a GroupedListView
Implementation
const GroupedListView({
Key? key,
required this.elements,
required this.groupBy,
this.groupComparator,
this.groupSeparatorBuilder,
this.groupHeaderBuilder,
this.itemBuilder,
this.indexedItemBuilder,
this.itemComparator,
this.order = GroupedListOrder.asc,
this.sort = true,
this.useStickyGroupSeparators = false,
this.separator = const SizedBox.shrink(),
this.floatingHeader = false,
this.stickyHeaderBackgroundColor = const Color(0xffF7F7F7),
this.scrollDirection = Axis.vertical,
this.controller,
this.primary,
this.physics,
this.shrinkWrap = false,
this.padding,
this.reverse = false,
this.addAutomaticKeepAlives = true,
this.addRepaintBoundaries = true,
this.addSemanticIndexes = true,
this.cacheExtent,
this.clipBehavior = Clip.hardEdge,
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
this.dragStartBehavior = DragStartBehavior.start,
this.restorationId,
this.semanticChildCount,
this.itemExtent,
this.onRefresh,
}) : assert(itemBuilder != null || indexedItemBuilder != null),
assert(groupSeparatorBuilder != null || groupHeaderBuilder != null),
super(key: key);