data property
T
get
data
Attempts to get the Result.data of the current Result value.
If no data is available in the current Result, the onErrorReturn callback, if specified, will be invoked to produce fallback data. Otherwise a NoDataException will be thrown.
Implementation
T get data {
if (value.hasData) {
return value.data!;
} else if (onErrorReturn != null) {
return onErrorReturn!(NoDataException());
} else {
throw NoDataException();
}
}