tryClear method

RxResult<void> tryClear()

Clear set with error handling

Implementation

RxResult<void> tryClear() {
  return RxResult.tryExecute(() {
    if (value.isNotEmpty) {
      value = <T>{};
    }
  }, 'clear set');
}