ExpandableListTileButton class

A widget that provides an expandable list tile button with customizable headers and content.

The ExpandableListTileButton can be used to create a list tile that expands to reveal additional content when tapped. It supports custom headers, icons, and expanded content.

Example usage:

ExpandableListTileButton.listTile(
  title: Text('Tap to expand'),
  expanded: Text('Expanded content here'),
);
Inheritance

Constructors

ExpandableListTileButton({Key? key, required Widget expanded, Widget? title, Widget? subtitle, Color? backgroundColor, Color? expandedColor, Color? iconColor, Color? trailingIconColor, Color? borderColor, double elevation = 4.0, Widget? leading, IconData? icon, Widget customHeader(Function tapAction, bool isExpanded)?})
Creates an ExpandableListTileButton with the given properties.
const
ExpandableListTileButton.custom({required Widget expanded, required Widget customHeader(Function tapAction, bool isExpanded), Color? backgroundColor, Color? expandedColor, Color? iconColor, Color? trailingIconColor, Color? borderColor, double elevation = 4.0})
Creates an ExpandableListTileButton with a custom header.
factory
ExpandableListTileButton.iconListTile({required Widget expanded, required IconData icon, required Widget title, Widget? subtitle, Color? backgroundColor, Color? expandedColor, Color? iconColor, Color? trailingIconColor, Color? borderColor, double elevation = 4.0, double sizeFactor = 1.0})
Creates an ExpandableListTileButton with a default IconListTileButton header.
factory
ExpandableListTileButton.listTile({required Widget expanded, required Widget title, Widget? subtitle, Color? backgroundColor, Color? expandedColor, Color? trailingIconColor, Color? borderColor, double elevation = 4.0, Widget? leading})
Creates an ExpandableListTileButton with a default ListTileButton header.
factory

Properties

backgroundColor Color?
The background color of the tile when collapsed.
final
borderColor Color?
The color of the border around the tile.
final
customHeader Widget Function(Function tapAction, bool isExpanded)?
A builder function to create a custom header widget.
final
elevation double
The elevation of the tile's shadow.
final
expanded Widget
The content to display when the tile is expanded.
final
expandedColor Color?
The background color of the expanded content.
final
hashCode int
The hash code for this object.
no setterinherited
icon IconData?
The icon data for the leading icon.
final
iconColor Color?
The color of the leading icon.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
The leading widget of the tile, typically an icon or avatar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle Widget?
Additional content displayed below the title when collapsed.
final
title Widget?
The primary content of the tile when collapsed.
final
trailingIconColor Color?
The color of the trailing expand/collapse icon.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ExpandableListTileButton>
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, int wrapWidth = 65}) 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