RxErrorHandling<T> extension

Error handling extensions for reactive values

on

Methods

chainSafe<R>(RxResult<R> operation(T value), {String? context}) RxResult<R>

Available on Rx<T>, provided by the RxErrorHandling extension

Chain operations with error handling
computeSafe<R>(R computation(T value)) Rx<R?>

Available on Rx<T>, provided by the RxErrorHandling extension

Create error-safe computed value
listenSafe(void listener(T value), {void onError(RxException error)?}) → void

Available on Rx<T>, provided by the RxErrorHandling extension

Listen with error handling
setWithValidation(T newValue, bool validator(T value), {String? validationMessage}) RxResult<void>

Available on Rx<T>, provided by the RxErrorHandling extension

Set value with validation
transformSafe<R>(R transformer(T value), {String? context}) RxResult<R>

Available on Rx<T>, provided by the RxErrorHandling extension

Transform value with error handling
tryGetValue({String? context}) RxResult<T>

Available on Rx<T>, provided by the RxErrorHandling extension

Get value with error handling
trySetValue(T newValue, {String? context}) RxResult<void>

Available on Rx<T>, provided by the RxErrorHandling extension

Set value with error handling
tryUpdate(T updater(T current), {String? context}) RxResult<void>

Available on Rx<T>, provided by the RxErrorHandling extension

Update value with error handling
updateWithRetry(T updater(T current), {int? maxRetries, Duration? retryDelay, String? context}) Future<RxResult<void>>

Available on Rx<T>, provided by the RxErrorHandling extension

Update value with retry logic
valueOr(T fallback) → T

Available on Rx<T>, provided by the RxErrorHandling extension

Get value or return fallback
valueOrElse(T fallback()) → T

Available on Rx<T>, provided by the RxErrorHandling extension

Get value or compute fallback