ExpansionTileItem class

Inheritance
Implementers

Constructors

ExpansionTileItem.new({Key? key, required Widget title, required List<Widget>? children, GlobalKey<ExpansionTileCoreState>? expansionKey, ValueChanged<bool>? onExpansionChanged, EdgeInsetsGeometry? tilePadding, bool initiallyExpanded = false, Color? backgroundColor, Color? textColor, Widget? subtitle, bool maintainState = false, Color? iconColor, CrossAxisAlignment? expandedCrossAxisAlignment, Alignment? expandedAlignment, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedIconColor, Color? collapsedBackgroundColor, EdgeInsetsGeometry? childrenPadding, Widget? trailing, Widget? leading, ThemeData? themeData, Decoration? decoration, BorderRadius? borderRadius, BoxBorder? border, Clip? clipBehavior, List<BoxShadow>? boxShadow, Color? expendedBorderColor, Color? collapsedBorderColor, bool? isHasTopBorder, bool? isHasLeftBorder, bool? isHasBottomBorder, bool? isHasRightBorder, bool? isHasTrailing, bool? isEnableExpanded, bool? isDefaultVerticalPadding, bool? isHideSubtitleOnExpanded, Widget? trailingIcon, bool? isOnlyTrailingDoToggle, ExpansionGroupController? controller, int? index})
const
ExpansionTileItem.card({Key? key, required Widget title, required List<Widget> children, ValueChanged<bool>? onExpansionChanged, GlobalKey<ExpansionTileCoreState>? expansionKey, bool? initiallyExpanded, EdgeInsetsGeometry? tilePadding, Alignment? expandedAlignment, Color? collapsedIconColor, CrossAxisAlignment? expandedCrossAxisAlignment, Color? iconColor, Color? textColor, Widget? subtitle, bool? maintainState, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedBackgroundColor, EdgeInsetsGeometry? childrenPadding, Widget? trailing, Widget? leading, Color? backgroundColor, Decoration? decoration, Clip? clipBehavior, ThemeData? themeData, List<BoxShadow>? boxShadow, Color? expendedBorderColor, Color? collapsedBorderColor, bool? isHasTopBorder, bool? isHasBottomBorder, bool? isHasLeftBorder, bool? isHasRightBorder, bool? isHasTrailing, bool? isEnableExpanded, bool? isDefaultVerticalPadding, bool? isHideSubtitleOnExpanded, bool? isOnlyTrailingDoToggle, Widget? trailingIcon, double? elevation, ExpansionGroupController? controller, int? index})
factory
ExpansionTileItem.flat({Key? key, required Widget title, required List<Widget>? children, GlobalKey<ExpansionTileCoreState>? expansionKey, ValueChanged<bool>? onExpansionChanged, EdgeInsetsGeometry? tilePadding, bool initiallyExpanded = false, Color? backgroundColor, Color? textColor, Widget? subtitle, bool maintainState = false, Color? iconColor, CrossAxisAlignment? expandedCrossAxisAlignment, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedIconColor, Color? collapsedBackgroundColor, Widget? trailing, Widget? leading, ThemeData? themeData, Decoration? decoration, Clip? clipBehavior, List<BoxShadow>? boxShadow, Widget? trailingIcon, BorderRadius? borderRadius, Color? collapsedBorderColor, Color? expendedBorderColor, bool? isHasTrailing, bool? isEnableExpanded, bool? isDefaultVerticalPadding, bool? isHideSubtitleOnExpanded, bool? isOnlyTrailingDoToggle, EdgeInsetsGeometry? childrenPadding, Alignment? expandedAlignment, ExpansionGroupController? controller, int? index})
const
ExpansionTileItem.leaf({Key? key, required Widget title, required List<Widget>? children, GlobalKey<ExpansionTileCoreState>? expansionKey, ValueChanged<bool>? onExpansionChanged, EdgeInsetsGeometry? tilePadding, bool initiallyExpanded = false, Color? backgroundColor, Color? textColor, Widget? subtitle, bool maintainState = false, Color? iconColor, CrossAxisAlignment? expandedCrossAxisAlignment, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedIconColor, Color? collapsedBackgroundColor, Widget? trailing, Widget? leading, ThemeData? themeData, Decoration? decoration, Clip? clipBehavior, List<BoxShadow>? boxShadow, bool? isDefaultVerticalPadding, Widget? trailingIcon, BoxBorder? border, bool? isHideSubtitleOnExpanded, EdgeInsetsGeometry? childrenPadding, Alignment? expandedAlignment, bool? isHasTrailing, bool? isEnableExpanded, bool? isOnlyTrailingDoToggle, ExpansionGroupController? controller, int? index, Color? collapsedBorderColor, Color? expendedBorderColor, double? leafRadius, bool isReverseLeaf = false, bool isOutlined = false})
ExpansionTileItem.outlined({Key? key, required Widget title, required List<Widget>? children, GlobalKey<ExpansionTileCoreState>? expansionKey, ValueChanged<bool>? onExpansionChanged, EdgeInsetsGeometry? tilePadding, bool initiallyExpanded = false, Color? backgroundColor, Color? textColor, Widget? subtitle, bool maintainState = false, Color? iconColor, CrossAxisAlignment? expandedCrossAxisAlignment, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedIconColor, Color? collapsedBackgroundColor, Widget? trailing, Widget? leading, ThemeData? themeData, Decoration? decoration, Clip? clipBehavior, List<BoxShadow>? boxShadow, bool? isDefaultVerticalPadding, Widget? trailingIcon, BoxBorder? border, bool? isHideSubtitleOnExpanded, EdgeInsetsGeometry? childrenPadding, Alignment? expandedAlignment, bool? isHasTrailing, bool? isEnableExpanded, bool? isOnlyTrailingDoToggle, BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8)), Color? collapsedBorderColor = Colors.grey, Color? expendedBorderColor = Colors.blue, ExpansionGroupController? controller, int? index})
const

Properties

backgroundColor Color?
The color to display behind the sublist when expanded.
final
border BoxBorder?
Use Border objects to describe borders that do not depend on the reading direction.
final
borderRadius BorderRadius?
If non-null, the corners of this box are rounded by this BorderRadius.
final
boxShadow List<BoxShadow>?
A list of shadows cast by this box behind the box. The shadow follows the shape of the box. See also: kElevationToShadow, for some predefined shadows used in Material Design. PhysicalModel, a widget for showing shadows.
final
children List<Widget>?
The widgets that are displayed when the tile expands.
final
childrenPadding EdgeInsetsGeometry?
Specifies padding for children.
final
clipBehavior Clip?
The clip behavior when Container.decoration is not null. Defaults to Clip.none. Must be Clip.none if decoration is null. If a clip is to be applied, the Decoration.getClipPath method for the provided decoration must return a clip path. (This is not supported by all decorations; the default implementation of that method throws an UnsupportedError.)
final
collapsedBackgroundColor Color?
When not null, defines the background color of tile when the sublist is collapsed.
final
collapsedBorderColor Color?
The color to display border box when collapsed.
final
collapsedIconColor Color?
The icon color of tile's expansion arrow icon when the sublist is collapsed.
final
collapsedTextColor Color?
The color of the tile's titles when the sublist is collapsed.
final
controlAffinity ListTileControlAffinity?
Typically used to force the expansion arrow icon to the tile's leading or trailing edge.
final
controller ExpansionGroupController?
final
decoration Decoration?
The decoration to paint behind the child. Use the color property to specify a simple solid color. The child is not clipped to the decoration. To clip a child to the shape of a particular ShapeDecoration, consider using a ClipPath widget.
final
expandedAlignment Alignment?
Specifies the alignment of children, which are arranged in a column when the tile is expanded.
final
expandedCrossAxisAlignment CrossAxisAlignment?
Specifies the alignment of each child within children when the tile is expanded.
final
expansionKey GlobalKey<ExpansionTileCoreState>?
Specifies if the item is expanded or not.
final
expendedBorderColor Color?
The color to display border box when expanded.
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
The icon color of tile's expansion arrow icon when the sublist is expanded.
final
index int?
final
initiallyExpanded bool
Specifies if the list tile is initially expanded (true) or collapsed (false, the default).
final
isDefaultVerticalPadding bool?
Remove completely default vertical title padding
final
isEnableExpanded bool?
The widget can expand or NOT. It helps when you want to prohibit expansion until the API requests success. More detail: https://github.com/congthanhng/Expansion-Tile-Group/issues/22
final
isHasBottomBorder bool?
final
isHasLeftBorder bool?
final
isHasRightBorder bool?
final
isHasTopBorder bool?
final
isHasTrailing bool?
Permanently hide trailing included default icon
final
isHideSubtitleOnExpanded bool?
Hide subtitle on expanded view
final
isOnlyTrailingDoToggle bool?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
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 ValueChanged<bool>?
Called when the tile expands or collapses.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle Widget?
Additional content displayed below the title.
final
textColor Color?
The color of the tile's titles when the sublist is expanded.
final
themeData ThemeData?
Specifies the color and typography values for descendant widgets.
final
tilePadding EdgeInsetsGeometry?
Specifies padding for the ListTile.
final
title Widget
The primary content of the list item.
final
trailing Widget?
A widget to display after the title.
final
trailingIcon Widget?
By default, ExpansionTile has default trailing icon with rotate animation whenever it is expanded/collapsed. This property used to override the default trailing icon.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
copyWith({Key? key, Widget? title, List<Widget>? children, ValueChanged<bool>? onExpansionChanged, GlobalKey<ExpansionTileCoreState>? expansionKey, bool? initiallyExpanded, EdgeInsetsGeometry? tilePadding, Alignment? expandedAlignment, Color? collapsedIconColor, CrossAxisAlignment? expandedCrossAxisAlignment, Color? iconColor, Color? textColor, Widget? subtitle, bool? maintainState, ListTileControlAffinity? controlAffinity, Color? collapsedTextColor, Color? collapsedBackgroundColor, EdgeInsetsGeometry? childrenPadding, Widget? trailing, Widget? leading, Color? backgroundColor, Decoration? decoration, BorderRadius? borderRadius, BoxBorder? border, Clip? clipBehavior, ThemeData? themeData, List<BoxShadow>? boxShadow, Color? expendedBorderColor, Color? collapsedBorderColor, bool? isHasTopBorder, bool? isHasBottomBorder, bool? isHasLeftBorder, bool? isHasRightBorder, bool? isHasTrailing, bool? isEnableExpanded, bool? isDefaultVerticalPadding, bool? isHideSubtitleOnExpanded, Widget? trailingIcon}) ExpansionTileItem
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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