INetworkManager<E extends INetworkModel<E>> class abstract

The INetworkManager interface is used to define the methods that are used to send HTTP requests to a server. It extends the NetworkManagerParameters

Implementers

Constructors

INetworkManager()
super.options is a getter method that returns the BaseOptions object

Properties

allHeaders Map<String, dynamic>
Get all headers value
no setterinherited
cache → NetworkManagerCache<INetworkModel>
cache is a getter method that returns the NetworkManagerCache
no setter
dioInterceptors Interceptors
The Interceptors get dioInterceptors; is a getter method that returns the interceptors used by the Dio HTTP client. Interceptors are functions that can be registered to intercept and modify HTTP requests or responses before they are sent or received.
no setter
hashCode int
The hash code for this object.
no setterinherited
parameters → NetworkManagerParameters
parameters is a getter method that returns the NetworkManagerParametersfor detail
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addBaseHeader(MapEntry<String, String> mapEntry) → void
This method will add your MapEntry to header
inherited
clearHeader() → void
Clear all headers value
inherited
downloadFile(String path, ProgressCallback? callback, {RequestType? method, Options? options, dynamic data}) Future<Response<List<int>?>>
The downloadFile method is used to download a file from a specified path using an HTTP request. It returns a Future<Response<List<int>?>> which represents the response received from the server. The response contains the downloaded file as a list of integers.
downloadFileSimple(String path, ProgressCallback? callback) Future<Response<List<int>?>>
The downloadFileSimple method is used to download a file from a specified path using a simple HTTP GET request. It returns a Future<Response<List<int>?>> which represents the response received from the server. The response contains the downloaded file as a list of integers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHeader(String key) → void
Remove header value with key
inherited
send<T extends INetworkModel<T>, R>(String path, {required T parseModel, required RequestType method, String? urlSuffix, Map<String, dynamic>? queryParameters, Options? options, Duration? expiration, dynamic data, ProgressCallback? onReceiveProgress, CancelToken? cancelToken, bool isErrorDialog = false}) Future<IResponseModel<R?, E?>>
The send method is used to send an HTTP request to a specified path with various parameters. Here is a breakdown of the parameters:
sendPrimitive<T>(String path, {Map<String, dynamic>? headers}) Future<T?>
The sendPrimitive method is a generic method that is used to send a primitive HTTP request to a specified path. It takes the path as a parameter and an optional headers parameter, which is a map of additional headers to be included in the request.
toString() String
A string representation of this object.
inherited
uploadFile<T>(String path, FormData data, {Map<String, dynamic>? headers}) Future<Response<T>>
The uploadFile method is used to upload a file to a specified path using an HTTP request. It takes the path of the file to be uploaded and a FormData object containing the file data as parameters. Additionally, it can also accept an optional headers parameter to include any custom headers in the request.

Operators

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