value property
Returns the expected value.
Throws a StateError if this object contains an error instead of a value.
Implementation
T get value {
if (!_hasValue) {
throw StateError('Cannot get value from an Expected containing an error: $_error');
}
return _value as T;
}