value property
T
value
Return the value T
of _ValueWrapper
or throws ErrorOrTypeError if
ErrorOr is not a _ValueWrapper
.
Implementation
T get value {
if (this is _ValueWrapper<T>) {
return (this as _ValueWrapper<T>)._value;
}
throw ErrorOrTypeError('Check [hasValue] before accessing [value]');
}