ExpandableListTileButton class

A versatile, animated, expandable list tile button.

Inheritance

Constructors

ExpandableListTileButton({Key? key, required Widget expanded, Widget customHeaderBuilder(dynamic tapAction(), bool isExpanded, bool isDisabled, double animationValue)?, Widget? title, Widget? subtitle, Color? headerBackgroundColor, Color? expandedBodyColor, Color? backgroundColor, Color? expandedColor, Color? iconColor, Color? trailingIconColor, Color? borderColor, Color? shadowColor, double elevation = 1, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? headerBodyPadding, EdgeInsetsGeometry? leadingPadding, EdgeInsetsGeometry? trailingPadding, double? headerWidth, double? headerHeight, double? headerMinWidth, double? headerMaxWidth, double? headerMinHeight, double? headerMaxHeight, Alignment headerContentAlignment = Alignment.centerLeft, double? leadingSizeFactor, Widget? leading, IconData? icon, IconData trailingExpandedIcon = Icons.expand_less, IconData trailingCollapsedIcon = Icons.expand_more, Widget trailingBuilder(bool isExpanded, bool isDisabled)?, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool disabled = false, bool headerDisabled = false, AlignmentGeometry bodyAlignment = Alignment.topCenter, ExpandableController? controller, Size? trailingSize, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOutCubic, bool enableHaptics = true, MouseCursor mouseCursor = SystemMouseCursors.click, String? semanticsLabel, bool continuous = true, Future<Widget> fetchExpandedContent()?, Widget? loadingWidget, Widget? errorWidget, bool overlay = false})
const
ExpandableListTileButton.async({Key? key, required Future<Widget> fetchExpandedContent(), required Widget title, Widget? loadingWidget, Widget? errorWidget, Widget? subtitle, Color? headerBackgroundColor, Color? expandedBodyColor, Color? trailingIconColor, double elevation = 1, Widget? leading, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, IconData trailingExpandedIcon = Icons.expand_less, IconData trailingCollapsedIcon = Icons.expand_more, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), ExpandableController? controller, Duration animationDuration = const Duration(milliseconds: 300), bool continuous = true})
factory
ExpandableListTileButton.custom({Key? key, required Widget expanded, required Widget customHeaderBuilder(dynamic tapAction(), bool isExpanded, bool isDisabled, double animValue), Color? headerBackgroundColor, Color? expandedBodyColor, Color? backgroundColor, Color? expandedColor, Color? borderColor, Color? shadowColor, double elevation = 1, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? headerBodyPadding, EdgeInsetsGeometry? leadingPadding, EdgeInsetsGeometry? trailingPadding, double? headerWidth, double? headerHeight, double? headerMinWidth, double? headerMaxWidth, double? headerMinHeight, double? headerMaxHeight, Alignment headerContentAlignment = Alignment.centerLeft, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool disabled = false, bool headerDisabled = false, AlignmentGeometry bodyAlignment = Alignment.topCenter, ExpandableController? controller, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOutCubic, bool enableHaptics = true, MouseCursor mouseCursor = SystemMouseCursors.click, String? semanticsLabel, bool continuous = true})
factory
ExpandableListTileButton.iconListTile({Key? key, required Widget expanded, required IconData icon, required Widget title, Widget? subtitle, Color? headerBackgroundColor, Color? expandedBodyColor, Color? backgroundColor, Color? expandedColor, EdgeInsetsGeometry? leadingPadding, EdgeInsetsGeometry? trailingPadding, Color? iconColor, Color? trailingIconColor, Color? borderColor, Color? shadowColor, double elevation = 1, double? leadingSizeFactor, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? headerBodyPadding, double? headerWidth, double? headerHeight, double? headerMinWidth, double? headerMaxWidth, double? headerMinHeight, double? headerMaxHeight, Alignment headerContentAlignment = Alignment.centerLeft, IconData trailingExpandedIcon = Icons.expand_less, IconData trailingCollapsedIcon = Icons.expand_more, Widget trailingBuilder(bool isExpanded, bool isDisabled)?, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool disabled = false, bool headerDisabled = false, AlignmentGeometry bodyAlignment = Alignment.topCenter, ExpandableController? controller, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOutCubic, bool enableHaptics = true, MouseCursor mouseCursor = SystemMouseCursors.click, String? semanticsLabel, bool continuous = true})
factory
ExpandableListTileButton.listTile({Key? key, required Widget expanded, required Widget title, Widget? subtitle, Color? headerBackgroundColor, Color? expandedBodyColor, Color? backgroundColor, Color? expandedColor, Color? trailingIconColor, Color? borderColor, Color? shadowColor, double elevation = 1, Widget? leading, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? headerBodyPadding, EdgeInsetsGeometry? leadingPadding, EdgeInsetsGeometry? trailingPadding, double? headerWidth, double? headerHeight, double? headerMinWidth, double? headerMaxWidth, double? headerMinHeight, double? headerMaxHeight, Alignment headerContentAlignment = Alignment.centerLeft, IconData trailingExpandedIcon = Icons.expand_less, IconData trailingCollapsedIcon = Icons.expand_more, Widget trailingBuilder(bool isExpanded, bool isDisabled)?, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool disabled = false, bool headerDisabled = false, AlignmentGeometry bodyAlignment = Alignment.topCenter, ExpandableController? controller, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOutCubic, bool enableHaptics = true, MouseCursor mouseCursor = SystemMouseCursors.click, String? semanticsLabel, bool continuous = true})
factory
ExpandableListTileButton.overlayMenu({Key? key, required Widget expanded, required Widget title, Widget? subtitle, Widget? leading, Color? headerBackgroundColor, Color? expandedBodyColor, Color? trailingIconColor, Color? borderColor, Color? shadowColor, double elevation = 1, EdgeInsetsGeometry? margin, double expandedBottomMargin = 16.0, EdgeInsetsGeometry? headerPadding, EdgeInsetsGeometry? headerBodyPadding, EdgeInsetsGeometry? leadingPadding, EdgeInsetsGeometry? trailingPadding, double? headerWidth, double? headerHeight, double? headerMinWidth, double? headerMaxWidth, double? headerMinHeight, double? headerMaxHeight, Alignment headerContentAlignment = Alignment.centerLeft, IconData trailingExpandedIcon = Icons.expand_less, IconData trailingCollapsedIcon = Icons.expand_more, Widget trailingBuilder(bool isExpanded, bool isDisabled)?, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10)), bool disabled = false, bool headerDisabled = false, AlignmentGeometry bodyAlignment = Alignment.center, ExpandableController? controller, double leadingSizeFactor = 1, Size? trailingSize, Duration animationDuration = const Duration(milliseconds: 300), Curve animationCurve = Curves.easeInOutCubic, bool enableHaptics = true, MouseCursor mouseCursor = SystemMouseCursors.click, String? semanticsLabel, bool continuous = true})
factory

Properties

animationCurve Curve
final
animationDuration Duration
final
backgroundColor Color?
final
bodyAlignment AlignmentGeometry
final
borderColor Color?
final
borderRadius BorderRadius
final
continuous bool
Determines the expansion style. true (Continuous): Header's bottom corners flatten to merge with the body. false (Layered): Header remains fully rounded, body spawns from half-way underneath it.
final
controller ExpandableController?
final
customHeaderBuilder Widget Function(dynamic tapAction(), bool isExpanded, bool isDisabled, double animationValue)?
final
disabled bool
final
elevation double
final
enableHaptics bool
final
errorWidget Widget?
final
expanded Widget
final
expandedBodyColor Color?
final
expandedBottomMargin double
final
expandedColor Color?
final
fetchExpandedContent Future<Widget> Function()?
final
hashCode int
The hash code for this object.
no setterinherited
headerBackgroundColor Color?
final
headerBodyPadding EdgeInsetsGeometry?
final
headerContentAlignment Alignment
final
headerDisabled bool
final
headerHeight double?
final
headerMaxHeight double?
final
headerMaxWidth double?
final
headerMinHeight double?
final
headerMinWidth double?
final
headerPadding EdgeInsetsGeometry?
final
headerWidth double?
final
icon IconData?
final
iconColor Color?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
final
leadingPadding EdgeInsetsGeometry?
final
leadingSizeFactor double?
final
loadingWidget Widget?
final
margin EdgeInsetsGeometry?
final
mouseCursor MouseCursor
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
final
shadowColor Color?
final
subtitle Widget?
final
title Widget?
final
trailingBuilder Widget Function(bool isExpanded, bool isDisabled)?
final
trailingCollapsedIcon IconData
final
trailingExpandedIcon IconData
final
trailingIconColor Color?
final
trailingPadding EdgeInsetsGeometry?
final
trailingSize Size?
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