Api class

Inheritance

Constructors

Api()

Properties

article ArticleApi
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
product ProductApi
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user UserApi
getter/setter pair

Methods

cancel([String? path]) → void
Cancels an ongoing HTTP request.
inherited
check(Response response, int time, {dynamic onRequest(Request request)?}) Future<Response>
A function to check and process an HTTP response.
inherited
delete(String path) Future<Response>
Sends a protected DELETE request to the specified path.
inherited
fetch(String method, String path, {Map<String, dynamic>? query, dynamic data, dynamic onReceiveProgress(int, int)?}) Future<Response>
Sends a protected request using method to the specified path with optional parameters.
inherited
get(String path, [Map<String, dynamic>? query]) Future<Response>
Sends a protected GET request to the specified path with optional query.
inherited
group(List<Future<Response>> requests) Future<List<Response>>
Executes a group of API requests concurrently and returns their responses.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String path, [dynamic data]) Future<Response>
Response res = await patch('user/1', {'name': 'John Doe'});
inherited
post(String path, [dynamic data]) Future<Response>
Sends a protected POST request to the specified path with optional data.
inherited
put(String path, [dynamic data]) Future<Response>
Sends a protected PUT request to the specified path with optional data.
inherited
setToken(String token, {String prefix = 'Bearer'}) → void
Sets the authentication token for API requests.
inherited
toFile(String path, {String? filename}) Future<MultipartFile>
String path = '/storage/emulated/0/Download/1.jpg'; final file = await toFile(path);
inherited
toString() String
Override and protected toString method
inherited

Operators

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