ValueItem<T> class

label is the item that is displayed in the list. value is the value that is returned when the item is selected. If the value is not provided, the label is used as the value. An example of a ValueItem is:

const ValueItem(label: 'Option 1', value: '1')

Constructors

ValueItem({required String label, required T? value})
Default constructor for ValueItem
const
ValueItem.fromJson(String source)
fromJson method for ValueItem
factory
ValueItem.fromMap(Map<String, dynamic> map)
fromMap method for ValueItem
factory

Properties

hashCode int
Hashcode for ValueItem
no setteroverride
label String
The label of the value item
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T?
The value of the value item
final

Methods

copyWith({String? label, T? value}) ValueItem<T>
CopyWith method for ValueItem
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toJson method for ValueItem
toMap() Map<String, dynamic>
toMap method for ValueItem
toString() String
toString method for ValueItem
override

Operators

operator ==(Object other) bool
Equality operator for ValueItem
override