Whether error is not null.
error
Even if hasError is true, it is still possible for hasValue/isLoading to also be true.
// It is safe to check it through `error != null` because `error` is // non-nullable on the AsyncError constructor. bool get hasError => error != null;