orElseThrow abstract method

T orElseThrow([
  1. Object? error
])

Returns the current value if present, otherwise throws the provided error or a StateError.

Implementation

T orElseThrow([Object? error]);