CustomExpansionTile class

ExpansionTile 可展开的列表项组件

Inheritance

Constructors

CustomExpansionTile({Widget? title, Key? key, Widget? leading, Widget? subtitle, ValueChanged<bool>? onExpansionChanged, List<Widget> children = const <Widget>[], Widget? trailing, bool showTrailingIcon = true, bool initiallyExpanded = false, bool maintainState = false, EdgeInsetsGeometry? tilePadding, CrossAxisAlignment? expandedCrossAxisAlignment, Alignment? expandedAlignment, EdgeInsetsGeometry? childrenPadding, Color? backgroundColor, Color? collapsedBackgroundColor, Color? textColor, Color? collapsedTextColor, Color? iconColor, Color? collapsedIconColor, ShapeBorder? shape, ShapeBorder? collapsedShape, Clip? clipBehavior = Clip.hardEdge, ListTileControlAffinity? controlAffinity, ExpansibleController? controller, bool? dense, VisualDensity? visualDensity, double? minTileHeight, bool? enableFeedback = true, bool enabled = true, AnimationStyle? expansionAnimationStyle, Color? borderColor, Color? collapsedBorderColor, String? titleText, String? subtitleText})
ExpansionTile 可展开的列表项组件
const

Properties

backgroundColor Color?
背景颜色
final
borderColor Color?
边框颜色
final
children List<Widget>
展开后显示的子组件列表
final
childrenPadding EdgeInsetsGeometry?
子组件内边距
final
clipBehavior Clip?
裁剪方式
final
collapsedBackgroundColor Color?
折叠状态下的背景颜色
final
collapsedBorderColor Color?
折叠状态下的边框颜色
final
collapsedIconColor Color?
折叠状态下的图标颜色
final
collapsedShape ShapeBorder?
折叠状态下的形状
final
collapsedTextColor Color?
折叠状态下的文本颜色
final
controlAffinity ListTileControlAffinity?
控件位置
final
controller ExpansibleController?
控制器
final
dense bool?
紧凑模式
final
enabled bool
启用状态
final
enableFeedback bool?
启用反馈
final
expandedAlignment Alignment?
展开后子组件的对齐方式
final
expandedCrossAxisAlignment CrossAxisAlignment?
展开后子组件的交叉轴对齐方式
final
expansionAnimationStyle AnimationStyle?
展开动画样式
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
图标颜色
final
initiallyExpanded bool
初始展开状态
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
前置图标或组件
final
maintainState bool
保持子组件状态
final
minTileHeight double?
最小高度
final
onExpansionChanged ValueChanged<bool>?
展开状态变化时的回调
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
形状
final
showTrailingIcon bool
显示尾部图标
final
subtitle Widget?
副标题组件
final
subtitleText String?
副标题文本
final
textColor Color?
文本颜色
final
tilePadding EdgeInsetsGeometry?
标题内边距
final
title Widget?
标题组件
final
titleText String?
标题文本
final
trailing Widget?
尾部图标或组件
final
visualDensity VisualDensity?
视觉密度
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
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