tryLast property

RxResult<T> get tryLast

Implementation

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