Response<T> class

Represents a response from the EAN-DB API.

Generic class that can contain data of type T, an error, or both. Also includes the current account balance.

Implementers

Constructors

Response({T? data, ErrorData? error, int balance = 0})
Creates a new Response instance.

Properties

balance int
The current account balance.
final
data → T?
The response data of type T, if the request was successful.
final
error ErrorData?
The error information, if the request failed.
final
hashCode int
The hash code for this object.
no setterinherited
isError bool
Returns true if the response contains an error.
no setter
isSuccess bool
Returns true if the response was successful (has data and no error).
no setter
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.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited