ApiResponse<T> class
Response from a web api, with a typed data field
Constructors
- ApiResponse(int statusCode, {T? data, String? error})
Properties
- data → T?
-
Response data transformed into a strongly typed object
final
- error → String?
-
Only populated when the request fails for some reason. This value will
contain an error response from the server or exception information if
the request failed before getting a response.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSuccess → bool
-
If the request was successful
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
Http status code returned from the server
final
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