setError method

void setError(
  1. dynamic newError, {
  2. bool force = false,
})
inherited

Change the error value.

Implementation

void setError(dynamic newError, {bool force = false}) {
  var candidate = _mutableObjects.triple.copyWith(
    error: newError,
    event: TripleEvent.error,
    isLoading: false,
  );
  candidate = middleware(candidate);
  if (force || (candidate.error != _mutableObjects.triple.error)) {
    _mutableObjects.triple = candidate;
    propagate(_mutableObjects.triple);
  }
}