BrnDeleteTag class

删除模式的标签 支持下下流式和横向滑动布局 可以外部主动添加和删除标签 宽高间距可设置 支持标签数量的增删

Inheritance
Available Extensions

Constructors

BrnDeleteTag({Key? key, List<String>? tags, BrnDeleteTagController? controller, dynamic onTagDelete(List<String>, String?, int)?, double? verticalSpacing, double? horizontalSpacing, TextStyle? tagTextStyle, OutlinedBorder? shape, Color? backgroundColor, Color? deleteIconColor, Size? deleteIconSize, bool softWrap = true, EdgeInsets padding = const EdgeInsets.fromLTRB(20, 0, 20, 0), BrnTagConfig? themeData})

Properties

backgroundColor Color?
标签背景色
final
controller BrnDeleteTagController?
标签控制器,用于主动添加和删除标签,如果使用场景只需要删除标签并进行回调可以不传控制器
final
deleteIconColor Color?
删除图标的颜色
final
deleteIconSize Size?
delete Icon Size,不传默认使用 内置删除 icon 图片的的大小,
final
hashCode int
The hash code for this object.
no setterinherited
horizontalSpacing double?
水平方向的间距
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTagDelete → (dynamic Function(List<String>, String?, int)?)
点击删除某个标签后的回调,参数包含 剩余的标签集合 被删除的标签内容 被删除的标签索引
final
padding EdgeInsets
内容边距,默认 EdgeInsets.fromLTRB(20, 0, 20, 0)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape OutlinedBorder?
标签的圆角
final
softWrap bool
true 流式展示,false 横向滑动展示,默认 true
final
tags List<String>?
初始传入的标签,当传入controller的时候,应把初始标签放入controller的构造中
final
tagTextStyle TextStyle?
标签的字体颜色
final
themeData BrnTagConfig?
主题配置信息,包含标签背景色、文本颜色等字段,非必传
getter/setter pair
verticalSpacing double?
垂直方向的间距
final

Methods

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