ApiRequest class

Managing api variant request

Constructors

ApiRequest.new()

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

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

Static Methods

delete({required String url, String authorization = '', int retryCount = 3, required dynamic response(Response)}) Future<void>
Sends an HTTP DELETE request to the specified url.
get({required String url, String authorization = '', Map<String, dynamic>? data, int retryCount = 3, required dynamic response(Response)}) Future
Sends an HTTP GET request to the specified url with optional query parameters and authorization.
recallAPI(Refreshable provider) → dynamic
Re-invokes a provider to refresh its data within the current widget context.
send({required String url, String authorization = '', Map<String, dynamic>? data, File? file, String? jsonFileKeyName, int retryCount = 3, required dynamic response(Response)}) Future
Sends an HTTP POST request to the specified url with optional data and file upload.
update({required String url, String authorization = '', Map<String, dynamic>? data, File? file, String? jsonFileKeyName, ApiMethod method = ApiMethod.put, int retryCount = 3, required dynamic response(Response)}) Future
Sends an HTTP request to update data using the specified HTTP method.