isServerError property

bool get isServerError

Whether this is a server error (5xx status code)

Implementation

bool get isServerError => statusCode != null && statusCode! >= 500;