CupertinoListView class

Display a vertical list of sections, as done by plain list on iOS : the current section remains displayed on top.

On contrary to ListView widget, it is not possible to display items :

  • in reverse mode
  • in Horizontal axis

These restrictions have been set to prevent bad UX design.

Inheritance

Constructors

CupertinoListView({required List<List<Widget>> children, ScrollController? controller, double? cacheExtent, Clip clipBehavior = Clip.hardEdge, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics? physics, String? restorationId, EdgeInsets? padding, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, required SectionBuilder floatingSectionBuilder})
Creates a scrollable, linear array of widgets from an explicit List of sections. Each section is a list containing the section title widget, as first element, followed by its children.
factory
CupertinoListView.builder({required int sectionCount, required SectionBuilder sectionBuilder, required SectionChildBuilder childBuilder, required SectionItemCount itemInSectionCount, ChildSeparatorBuilder? separatorBuilder, ScrollController? controller, double? cacheExtent, Clip clipBehavior = Clip.hardEdge, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics? physics, String? restorationId, EdgeInsets? padding, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual})
Creates a scrollable, linear array of widgets that are created on demand, defined by sections. A section is a widget describing a finite group of children.
factory

Properties

cacheExtent double?
final
clipBehavior Clip
Same as ListView.clipBehavior: "ways to clip a widget's content".
final
controller ScrollController?
Same as ListView.scrollController: "control the position to which this scroll view is scrolled".
final
dragStartBehavior DragStartBehavior
Same as ListView.dragStartBehavior: "Determines the way that drag start behavior is handled".
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardDismissBehavior ScrollViewKeyboardDismissBehavior
Defines how the list will dismiss the keyboard automatically.
final
padding EdgeInsets?
The amount of space by which to inset the children.
final
physics ScrollPhysics?
Same as ListView.physics: "How the scroll view should respond to user input".
final
restorationId String?
Same as ListView.restorationId: used "to save and restore the scroll offset of the scrollable".
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CupertinoListViewState
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