ResponseAPI class

A model class to represent API responses in a structured format.

Constructors

ResponseAPI.new(int code, Map<String, dynamic> response, {bool? isError, dynamic isCacheError, dynamic error})
Constructor to initialize the API response.

Properties

code int
The HTTP status code of the API response.
getter/setter pair
error ↔ dynamic
The actual error details, if any.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isCacheError ↔ dynamic
A flag to indicate if the error is due to cached data (optional).
getter/setter pair
isError bool?
A flag indicating whether the response contains an error.
getter/setter pair
response Map<String, dynamic>
The response body returned from the API, stored as a map.
final
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.
inherited

Operators

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