APIResponse<T> class
All API request returns a APIResponse.
If response is success, errors will be null and data will not.
Else, response is error response, errors will not be null, and data will not.
- Inheritance
-
- Object
- APIResponseBase
- APIResponse
Constructors
- APIResponse({T? data, APIError? errors})
- Create APIResponse with generic types.
Properties
Methods
-
cast<
R> () → APIResponse< R> - Type cast for data
-
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