SelectData<T> class

Constructors

SelectData({required String label, required dynamic value, bool disabled = false, bool hasChildren = false, List<SelectData<T>>? children, required T data})
const
SelectData.fromJson(Map<String, dynamic> json)
从JSON创建实例
factory

Properties

children List<SelectData<T>>?
final
data → T
final
disabled bool
final
hasChildren bool
final
hashCode int
The hash code for this object.
no setteroverride
label String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → dynamic
final

Methods

copyWith({String? label, dynamic value, T? data, bool? hasChildren, List<SelectData<T>>? children}) SelectData<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
转换为JSON
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJsonList<T>(List jsonList) List<SelectData<T>>
从JSON列表创建SelectData列表
toJsonList<T>(List<SelectData<T>> dataList) List<Map<String, dynamic>>
将SelectData列表转换为JSON列表