Response<ItemType> class

Main class to hold http response

Constructors

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

Properties

code → int
Status code for this request
final
error → Object?
Error of http request
final
fromDatabase → bool
Flag to detect that result was from database
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map?
Headers for response of this request
final
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
final
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