ApiResponse<T> class
Wrapper class for all the responses from the API
- Annotations
-
- @immutable
Constructors
- ApiResponse({required bool wasSuccessful, T? data, String? error})
- Default constructor
Properties
- data → T?
-
Contains response data of type
T
final - error → String?
-
In case of error provides some additional information, may be empty
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wasSuccessful → bool
-
Indicates whether response was success
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override