SliverGroupedListView<T, E> class

Inheritance
Annotations

Constructors

SliverGroupedListView({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, 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(), Widget? footer})
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
groupHeaderBuilder Widget Function(T element)?
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

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited