isSuccessful property

bool get isSuccessful

true if status code is >= 200 && <3 if false, error will contains the response

Implementation

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