StickyGroupedListView<T, E> class
A groupable list of widgets similar to ScrollablePositionedList
, execpt
that the items can be sectioned into groups.
See ScrollablePositionedList
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- StickyGroupedListView
Constructors
-
StickyGroupedListView({Key? key, required List<
T> elements, required E groupBy(T element), required Widget groupSeparatorBuilder(T element), int groupComparator(E value1, E value2)?, Widget itemBuilder(BuildContext context, T element)?, Widget indexedItemBuilder(BuildContext context, T element, int index)?, int itemComparator(T element1, T element2)?, dynamic elementIdentifier(T element)?, StickyGroupedListOrder order = StickyGroupedListOrder.ASC, Widget separator = const SizedBox.shrink(), bool floatingHeader = false, Color stickyHeaderBackgroundColor = const Color(0xffF7F7F7), Axis scrollDirection = Axis.vertical, GroupedItemScrollController? itemScrollController, ItemPositionsListener? itemPositionsListener, ScrollPhysics? physics, EdgeInsets? padding, bool reverse = false, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? minCacheExtent, int? semanticChildCount, double initialAlignment = 0, int initialScrollIndex = 0, bool shrinkWrap = false}) -
Creates a StickyGroupedListView.
const
Properties
- addAutomaticKeepAlives → bool
-
Whether to wrap each child in an AutomaticKeepAlive.
final
- addRepaintBoundaries → bool
-
Whether to wrap each child in a RepaintBoundary.
final
- addSemanticIndexes → bool
-
Whether to wrap each child in an IndexedSemantics.
final
- elementIdentifier → (dynamic Function(T element)?)
-
Used to clearly indentify an element. The returned value can be of any
type but must be unique for each element.
final
-
elements
→ List<
T> -
Items of which itemBuilder or indexedItemBuilder produce the list.
final
- floatingHeader → bool
-
Whether the group headers float over the list or occupy their own space.
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
- groupSeparatorBuilder → Widget Function(T element)
-
Called to build group separators for each group.
element is always 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
- initialAlignment → double
-
Determines where the leading edge of the item at initialScrollIndex
should be placed.
final
- initialScrollIndex → int
-
Index of an item to initially align within the viewport.
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
- itemPositionsListener → ItemPositionsListener?
-
Notifier that reports the items laid out in the list after each frame.
final
- itemScrollController → GroupedItemScrollController?
-
Controller for jumping or scrolling to an item.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minCacheExtent → double?
-
The minimum cache extent used by the underlying scroll lists.
See ScrollView.cacheExtent.
final
- order → StickyGroupedListOrder
-
Whether the sorting of the list is ascending or descending.
final
- padding → EdgeInsets?
-
The amount of space by which to inset the children.
final
- physics → ScrollPhysics?
-
How the scroll view should respond to user input.
final
- reverse → bool
-
Whether the view scrolls in the reading direction.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → Axis
-
The axis along which the scroll view scrolls.
final
- semanticChildCount → int?
-
The number of children that will contribute semantic information.
final
- separator → Widget
-
Called to build separators for between each item in the list.
final
- shrinkWrap → bool
-
Whether the extent of the scroll view in the scrollDirection should be
determined by the contents being viewed.
final
- stickyHeaderBackgroundColor → Color
-
Background color of the sticky header.
Only used if floatingHeader is false.
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