GeneralResponse<T> class

Generic response wrapper for all API calls Provides consistent error handling and success status

Constructors

GeneralResponse({T? data, DioException? dioException, ApiError? apiError, required int statusCode})

Properties

apiError ApiError?
getter/setter pair
data ↔ T?
getter/setter pair
dioException ↔ DioException?
getter/setter pair
errorDescription String
Get detailed error description
no setter
errorMessage String
Get error message from either ApiError or DioException
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
getter/setter pair
success bool
Check if the response was successful (status code 200-299)
no setter

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