value property
inherited
The current value stored in this property.
A representation of the current value is stored in the restoration data. During state restoration, the property will restore the value to what it was when the restoration data it is getting restored from was collected.
The value can only be accessed after the property has been registered with a RestorationMixin by calling RestorationMixin.registerForRestoration.
Implementation
T get value {
assert(isRegistered);
return _value as T;
}
override
Implementation
@override
set value(T newValue) {
assert(values.contains(newValue),
'Attempted to set an unknown enum value "$newValue" that is not in the '
'valid set of enum values for the $T type: '
'${values.map<String>((T value) => value.name).toSet()}');
super.value = newValue;
}