SpinnerItemData class

继承 ChangeNotifier ValueListenable 写入自变量 selected,方便监听点击选中状态

Inheritance
Implemented types

Constructors

SpinnerItemData({String name = '-', dynamic result, bool isMutex = false, List<SpinnerItemData> items = const [], bool isItemIntercept = false, SCheckedStatus selected = SCheckedStatus.unchecked})
SpinnerItemData.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isItemIntercept → bool
当前按钮是否支持点击拦截都可以点击,只是不触发选中
final
isMutex → bool
是否选中互斥
final
items → List<SpinnerItemData>
下级选项
final
name → String
显示名称
final
result → dynamic
选中项的数据值 (原样输入输出) 如果数据类型与实际类型不匹配时,可将实际数据放入result中 以保证选中时输出实际类容的集合
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selected ↔ SCheckedStatus
高亮(栅栏选中时,需要切换数据) 选中状态
getter/setter pair
value ↔ SCheckedStatus
带有子集选项时,判断当前选项的子选项是否全部选中 不对外使用 外部使用 selected isHighlight 替代
getter/setter pairoverride-getter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
copyWith({String? name, dynamic result, SCheckedStatus? selected, bool? isItemIntercept, bool? isMutex, List<SpinnerItemData>? items}) → SpinnerItemData
dispose() → void
Discards any resources used by the object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromList(List<Map<String, dynamic>> list) → List<SpinnerItemData>