ToggleList class

A list that lays out its toggleable children.

This widget is also responsible for scrolling properties, list animations, and the number of expanded items.

Inheritance

Constructors

ToggleList({Key? key, required List<ToggleListItem> children, Curve curve = Curves.easeIn, Widget divider = const SizedBox(height: 20), bool flipTrailingOnToggle = true, EdgeInsets innerPadding = const EdgeInsets.symmetric(horizontal: 8), Duration toggleAnimationDuration = const Duration(milliseconds: 500), Sections sectionsLeftExpanded = Sections.last, Axis scrollDirection = Axis.vertical, Duration scrollDuration = const Duration(milliseconds: 500), AutoScrollPosition scrollPosition = AutoScrollPosition.begin, ScrollPhysics scrollPhysics = const AlwaysScrollableScrollPhysics(), bool shrinkWrap = false, Widget trailing = const Icon(Icons.expand_more), Widget? trailingExpanded, EdgeInsets viewPadding = const EdgeInsets.all(0)})
Constructs a toggle list, that holds ToggleListItems.
const

Properties

children List<ToggleListItem>
A list of ToggleListItem widgets that are managed and drawn on the screen.
final
curve Curve
The curve of toggle animations.
final
divider Widget
A widget between each adjacent list item that visually seperates them.
final
flipTrailingOnToggle bool
Specifies whether trailing flips automatically when toggled.
final
hashCode int
The hash code for this object.
no setterinherited
innerPadding EdgeInsets
The padding between the set of elements and the outer boundary of the list.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
The direction in which the list can be scrolled.
final
scrollDuration Duration
The duration of the animation with which the item is scrolled to its position when expanded.
final
scrollPhysics ScrollPhysics
The scrolling physics determine how the list responds to scrolling.
final
scrollPosition AutoScrollPosition
The end position of the animation in which the item is scrolled to its position when expanded.
final
sectionsLeftExpanded Sections
Item closing policy for the list.
final
shrinkWrap bool
Specifies whether the list should shrink wrap.
final
toggleAnimationDuration Duration
The duration of the animation with which the item is expanded and shurnk.
final
trailing Widget
The rightmost component of the header.
final
trailingExpanded Widget?
The rightmost component of the header when the item is expanded.
final
viewPadding EdgeInsets
The additional padding of the viewport.
final

Methods

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