SliverGroupedListView<T, E> class
Constructors
-
SliverGroupedListView({Key? key, required List<T> elements, required E groupBy(T element), int groupComparator(E value1, E value2)?, Widget groupSeparatorBuilder(E value)?, Widget itemBuilder(BuildContext context, T element)?, Widget indexedItemBuilder(BuildContext context, T element, int index)?, int itemComparator(T element1, T element2)?, GroupedListOrder order = GroupedListOrder.ASC, bool sort = true, Widget separator = const SizedBox.shrink(), })
-
Creates a SliverGroupedListView
const
Properties
-
elements
→ List<T>
-
Items of which itemBuilder or indexedItemBuilder produce the list.
final
-
Widget at the end of the list
final
-
groupBy
→ E Function(T element)
-
Defines which elements are grouped together.
final
-
groupComparator
→ int Function(E value1, E value2)?
-
Can be used to define a custom sorting for the groups.
final
-
Same as groupSeparatorBuilder, will be called to build group separators
for each group.
The passed element is always the first element of the group.
final
-
groupSeparatorBuilder
→ Widget Function(E value)?
-
Called to build group separators for each group.
Value is always the groupBy result from the first element of the group.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
indexedItemBuilder
→ Widget Function(BuildContext context, T element, int index)?
-
Called to build children for the list with
0 <= element, index < elements.length
final
-
itemBuilder
→ Widget Function(BuildContext context, T element)?
-
Called to build children for the list with
0 <= element < elements.length.
final
-
itemComparator
→ int Function(T element1, T element2)?
-
Can be used to define a custom sorting for the elements inside each group.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
order
→ GroupedListOrder
-
Whether the order of the list is ascending or descending.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
separator
→ Widget
-
Called to build separators for between each item in the list.
final
-
sort
→ bool
-
Whether the elements will be sorted or not. If not it must be done
manually.
final