CustomExpansionTile class

A single-line ListTile with a trailing button that expands or collapses the tile to reveal or hide the children.

This widget is typically used with ListView to create an "expand / collapse" list entry. When used with scrolling widgets like ListView, a unique PageStorageKey must be specified to enable the CustomExpansionTile to save and restore its expanded state when it is scrolled in and out of view.

See also:

Constructors

CustomExpansionTile({dynamic key, dynamic leading, @required dynamic title, dynamic subtitle, dynamic backgroundColor, dynamic onExpansionChanged, List children: const <Widget>[], dynamic trailing, bool initiallyExpanded: false, bool maintainState: false, dynamic tilePadding, dynamic expandedCrossAxisAlignment, dynamic expandedAlignment, dynamic childrenPadding})
Creates a single-line ListTile with a trailing button that expands or collapses the tile to reveal or hide the children. The initiallyExpanded property must be non-null.
const

Properties

backgroundColor → dynamic
The color to display behind the sublist when expanded.
final
children List
The widgets that are displayed when the tile expands. [...]
final
childrenPadding → dynamic
Specifies padding for children. [...]
final
expandedAlignment → dynamic
Specifies the alignment of children, which are arranged in a column when the tile is expanded. [...]
final
expandedCrossAxisAlignment → dynamic
Specifies the alignment of each child within children when the tile is expanded. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
initiallyExpanded bool
Specifies if the list tile is initially expanded (true) or collapsed (false, the default).
final
leading → dynamic
A widget to display before the title. [...]
final
maintainState bool
Specifies whether the state of the children is maintained when the tile expands and collapses. [...]
final
onExpansionChanged → dynamic
Called when the tile expands or collapses. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
subtitle → dynamic
Additional content displayed below the title. [...]
final
tilePadding → dynamic
Specifies padding for the ListTile. [...]
final
title → dynamic
The primary content of the list item. [...]
final
trailing → dynamic
A widget to display instead of a rotating arrow icon.
final

Methods

createState() → _ExpansionTileState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited