TDCheckbox class
复选框组件。
FuiCheckbox支持3种内置样式的的复选框,还支持各种自定义样式,除了提供勾选之外还提供了内 容选项,内容包含一个主标题和副标题,并且支持完全自定义内容,支持指定内容的方向等等
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TDCheckbox
- Implementers
Constructors
- TDCheckbox({String? id, Key? key, String? title, String? subTitle, bool enable = true, bool checked = false, int? titleMaxLine, int? subTitleMaxLine = 1, IconBuilder? customIconBuilder, ContentBuilder? customContentBuilder, double? insetSpacing = 16, TDCheckboxStyle? style, double? spacing, Color? backgroundColor, TDCheckBoxSize size = TDCheckBoxSize.small, bool cardMode = false, bool showDivider = true, TDContentDirection contentDirection = TDContentDirection.right, OnCheckValueChanged? onCheckBoxChanged})
-
const
Properties
- backgroundColor → Color?
-
背景颜色
final
- cardMode → bool
-
展示为卡片模式
final
- checked → bool
-
选中状态。默认为
false
当FuiCheckBox嵌入到FuiCheckBoxGroup的时候,这个值表示初始状态,后续的状态会由Group管理final - contentDirection → TDContentDirection
-
文字相对icon的方位
final
- customContentBuilder → ContentBuilder?
-
完全自定义内容
final
- customIconBuilder → IconBuilder?
-
自定义Checkbox显示样式
final
- enable → bool
-
不可用
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
id
当FuiCheckBox嵌入到FuiCheckBoxGroup内时,这个值需要赋值,否则不会被纳入Group管理
final
- insetSpacing → double?
-
文字和非图标侧的距离
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCheckBoxChanged → OnCheckValueChanged?
-
切换监听
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDivider → bool
-
是否展示分割线
final
- size → TDCheckBoxSize
-
复选框大小
final
- spacing → double?
-
icon和文字的距离
final
- style → TDCheckboxStyle?
-
复选框样式:圆形或方形
final
- subTitle → String?
-
辅助文字
final
- subTitleMaxLine → int?
-
辅助文字的行数
final
- title → String?
-
文本
final
- titleMaxLine → int?
-
标题的行数
final
Methods
-
buildDefaultIcon(
BuildContext context, TDCheckboxGroupState? groupState, bool isChecked) → Widget - 默认的checkBox icon
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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