ExpansionList<T> class

An expansion list

A widget that expands and collapses with a list of items.

Get the item selected and set it as title.

Inheritance

Constructors

ExpansionList({Key? key, List<T>? items, String? title, @required dynamic onItemSelected(T)?, bool smallVersion = false, MainAxisAlignment? childrenAlignment, MainAxisAlignment? titleAlignment, Icon? icon, Icon? childrenTrailingIcon, Icon? childrenLeadingIcon, double height = 40, Color? dividerColor, TextStyle? textStyle, Color? backgroundColor, Color? collapseBackgroundColor, double? spacingBtwTextAndIcon, double width = 100})

Properties

backgroundColor Color?
Background color when expands
final
childrenAlignment MainAxisAlignment?
The alignment for the items
final
childrenLeadingIcon Icon?
Items leading icon if not null
final
childrenTrailingIcon Icon?
Items trailing icon if not null
final
collapseBackgroundColor Color?
collapsing background color
final
dividerColor Color?
To set the color of the divider between title and other items
final
hashCode int
The hash code for this object.
no setterinherited
height double
The collapsing expansion height
final
icon Icon?
The title icon
final
items List<T>?
The list of items for the expansion
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onItemSelected → (dynamic Function(T)?)
The method to get the item selected for re-use
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smallVersion bool
If set to true, a small specific size is given to the expansion by default
final
spacingBtwTextAndIcon double?
To space item from its leading and trailing icons
final
textStyle TextStyle?
To style the text of the items
final
title String?
The title of the expansion which changes on new item selected.
final
titleAlignment MainAxisAlignment?
Title alignment
final
width double
The collapsing expansion width
final

Methods

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