onFailure method

void onFailure(
  1. void callback(
    1. RxException error
    )
)

Execute callback if failed

Implementation

void onFailure(void Function(RxException error) callback) {
  if (this case RxFailure<T> failure) {
    callback(failure.error);
  }
}