TDSelectTag class

点击型标签组件,点击时内部更改自身状态 支持样式:方形/圆角/半圆/带关闭图标

Inheritance

Constructors

TDSelectTag(String text, {TDTagTheme? theme, IconData? icon, Widget? iconWidget, TDTagStyle? selectStyle, TDTagStyle? unSelectStyle, TDTagStyle? disableSelectStyle, ValueChanged<bool>? onSelectChanged, bool isSelected = false, bool disableSelect = false, TDTagSize size = TDTagSize.medium, EdgeInsets? padding, bool forceVerticalCenter = true, bool isOutline = false, TDTagShape shape = TDTagShape.square, bool isLight = false, bool needCloseIcon = false, GestureTapCallback? onCloseTap, Key? key})
const

Properties

disableSelect bool
是否禁用选择
final
disableSelectStyle TDTagStyle?
不可选标签样式
final
forceVerticalCenter bool
是否强制中文文字居中
final
hashCode int
The hash code for this object.
no setterinherited
icon IconData?
图标内容,可随状态改变颜色
final
iconWidget Widget?
自定义图标内容,需自处理颜色
final
isLight bool
是否为浅色
final
isOutline bool
是否为描边类型,默认不是
final
isSelected bool
是否选中
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
needCloseIcon bool
关闭图标
final
onCloseTap GestureTapCallback?
关闭图标点击事件
final
onSelectChanged ValueChanged<bool>?
标签点击,选中状态改变时的回调
final
padding EdgeInsets?
自定义模式下的间距
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectStyle TDTagStyle?
选中的标签样式
final
shape TDTagShape
标签形状
final
size TDTagSize
标签大小
final
text String
标签内容
final
theme TDTagTheme?
主题
final
unSelectStyle TDTagStyle?
未选中标签样式
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _TDClickTagState
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