isClientError property

bool get isClientError

Checks if the status code is in the 400-499 range, indicating a client error.

Implementation

bool get isClientError =>
    statusCode != null && statusCode! >= 400 && statusCode! < 500;