tryGetValue method

RxResult<T> tryGetValue()

Get value with error handling

Implementation

RxResult<T> tryGetValue() {
  if (_lastError != null) {
    return RxResult.failure(_lastError!);
  }
  return RxResult.success(value);
}