ApiClient class

Constructors

ApiClient()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelRequest() → dynamic
clearAuthToken() Future<void>
🔹 Clear token (logout)
delete<T>(String path, {dynamic data, Options? options}) Future<Response<T>>
🔹 DELETE request (optional)
get<T>(String path, {Map<String, dynamic>? query, Options? options}) Future<Response<T>>
🔹 GET request
loadToken() Future<void>
🔹 Load saved token from storage
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post<T>(String path, {dynamic data, Options? options}) Future<Response<T>>
🔹 POST request
put<T>(String path, {dynamic data, Options? options}) Future<Response<T>>
🔹 PUT request (optional)
setAuthToken(String token) Future<void>
🔹 Save token
toString() String
A string representation of this object.
inherited

Operators

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