ApiResponse<T> class Null safety

Wrapper class for all the responses from the API

Annotations

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.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
wasSuccessful bool
Indicates whether response was success
final

Methods

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

Operators

operator ==(Object o) bool
The equality operator.
override