ToggleListItem class
Single list item with the ability to expand and shrink.
This item stores the required parameters and draws itself on the screen based on them. Use only as a child of ToggleList.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ToggleListItem
Constructors
- ToggleListItem({Key? key, required Widget content, required Widget title, Widget divider = const SizedBox(height: 0), Decoration? expandedHeaderDecoration, Widget? expandedTitle, Decoration headerDecoration = const BoxDecoration(), Decoration itemDecoration = const BoxDecoration(), bool isInitiallyExpanded = false, Widget leading = const SizedBox(width: 0), dynamic onExpansionChanged(int index, bool newValue)?})
-
Contructs a list item to be used as a child of a ToggleList.
const
Properties
- content → Widget
-
The expandable part of the item.
final
- divider → Widget
-
The component between title and content.
final
- expandedHeaderDecoration → Decoration?
-
The decoration of this item's header.
final
- expandedTitle → Widget?
-
The middle component of the expanded header.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerDecoration → Decoration
-
The decoration of this item's header.
final
- isInitiallyExpanded → bool
-
The initial status of this item.
final
- itemDecoration → Decoration
-
The decoration of this item.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget
-
The leftmost component of the header.
final
- onExpansionChanged → (dynamic Function(int index, bool newValue)?)
-
A function which is called when this item's toggle state has changed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → Widget
-
The middle component of the header.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ToggleListItem> -
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