wasSuccessful property
bool
get
wasSuccessful
If the response from the server appears to be successful, as determined by there being no exception and a statusCode in the 200-300 range.
Implementation
bool get wasSuccessful {
var status = statusCode;
return exception == null && status != null && status >= 200 && status < 400;
}