Response<ItemType> class

Main class to hold Dio response

Constructors

Response.new({ItemType? result, Object? error, required int code, Map? headers, bool fromDatabase = false})

Properties

code int
Status code for this request
getter/setter pair
error Object?
Error of Dio request
getter/setter pair
fromDatabase bool
Flag to detect that result was from database
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map?
Headers for response of this request
getter/setter pair
isSuccessful bool
Checks that error is not null and status code is equal to 200 or less than 400 and greater than 200
no setter
isSuccessfulFromDatabase bool
Checks that result is not null and was obtained from database
no setter
result ↔ ItemType?
Parsed result of request
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited