isUnauthorized property

bool get isUnauthorized

Returns true if the response status code is 401 (Unauthorized).

Indicates that the request requires authentication or the authentication failed.

Implementation

bool get isUnauthorized {
  return response?.statusCode == 401;
}