hasError property

bool get hasError

Whether error is not null.

Even if hasError is true, it is still possible for hasValue/isLoading to also be true.

Implementation

// It is safe to check it through `error != null` because `error` is non-nullable
// on the AsyncError constructor.
bool get hasError => error != null;