tryFirst property

RxResult<T> get tryFirst

Implementation

RxResult<T> get tryFirst {
  return RxResult.tryExecute(() {
    if (value.isEmpty) {
      throw const RxException('Cannot get first element of empty set');
    }
    return value.first;
  }, 'get first element from set');
}