ArticleApi class

Inheritance

Constructors

ArticleApi()

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

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
createData(Map<String, dynamic> data) Future<Response>
delete(String path) Future<Response>
Response res = await delete('user/1');
inherited
deleteData(int id) Future<Response>
fetch(String method, String path, {Map<String, dynamic>? query, dynamic data, dynamic onReceiveProgress(int, int)?}) Future<Response>
Response res = await fetch('GET', 'user', onReceiveProgress: (a, b) {});
inherited
get(String path, [Map<String, dynamic>? query]) Future<Response>
Response res = await get('user');
inherited
getData([Map<String, dynamic>? query]) Future<Response>
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>
final payload = {'name': 'John Doe'}; Response res = await post('user', payload); Response res = await post('user', payload.toFormData());
inherited
put(String path, [dynamic data]) Future<Response>
Response res = await put('user/1', {'name': 'John Doe'});
inherited
toFile(String path, {String? filename}) Future<MultipartFile>
String path = '/storage/emulated/0/Download/1.jpg'; final file = await toFile(path);
inherited
toString() String
A string representation of this object.
inherited
updateData(Map<String, dynamic> data, int id) Future<Response>

Operators

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