ApiResponse<T> class

A standard wrapper for all API responses in the application.

It encapsulates the data returned from the server or represents an empty success state (e.g., 204 No Content).

Constructors

ApiResponse.completed(T? data)
Creates a successful response with the given data.
ApiResponse.empty()
Creates a successful response with no data.

Properties

data → T?
The data returned from the API, if any.
final
hashCode → int
The hash code for this object.
no setterinherited
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