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.new({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
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