isSuccessful property

bool get isSuccessful

Whether the status code is in the 2xx range.

Implementation

bool get isSuccessful => statusCode >= 200 && statusCode < 300;