Constructors
-
NetworkService({String baseUrl = '', String? method, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, Map<String, dynamic>? queryParameters, ResponseType? responseType = ResponseType.json, String? contentType, bool validateStatus(int?)?, bool? receiveDataWhenStatusError, bool? followRedirects, int? maxRedirects, List<int> requestEncoder(String, RequestOptions)?, String responseDecoder(List<int>, RequestOptions, ResponseBody)?, ListFormat? listFormat, bool? persistentConnection, Dio? dio})
-
Methods
-
addInterceptors(Iterable<Interceptor> interceptors)
→ void
-
override
-
checkInternet()
→ Future<Either<NetworkError, bool>>
-
override
-
delete({required String deletePath, int retry = 0, Map<String, dynamic>? queryParameter, )
→ Future<Either<NetworkError, dynamic>>
-
override
-
download({required String url, required String downloadPath, required String fileName, Map<String, dynamic>? queryParameter, dynamic onReceiveProgress(int, int)?})
→ Future<Either<NetworkError, dynamic>>
-
override
-
getDio()
→ Dio
-
override
-
getHttp({required String path, int retry = 0, String? parameter, Map<String, dynamic>? queryParameter, dynamic onReceiveProgress(int, int)?, RetryEvaluator? evaluator})
→ Future<Either<NetworkError, dynamic>>
-
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a non-existent method or property is accessed.
inherited
-
patchHttp({required String path, int retry = 0, String? parameter, Map<String, dynamic>? queryParameter, dynamic content, String? contentType, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, RetryEvaluator? evaluator})
→ Future<Either<NetworkError, dynamic>>
-
override
-
postHttp({required String path, int retry = 0, String? parameter, Map<String, dynamic>? queryParameter, dynamic content, String? contentType, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, RetryEvaluator? evaluator})
→ Future<Either<NetworkError, dynamic>>
-
override
-
putHttp({required String path, int retry = 0, String? parameter, Map<String, dynamic>? queryParameter, dynamic content, String? contentType, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, RetryEvaluator? evaluator})
→ Future<Either<NetworkError, dynamic>>
-
override
-
request({required String path, int retry = 0, String? parameter, Map<String, dynamic>? queryParameter, dynamic content, String? contentType, dynamic onSendProgress(int, int)?, dynamic onReceiveProgress(int, int)?, RetryEvaluator? evaluator, NetworkOptions? networkOptions, Duration? networkReceiveTimeout, Duration? networkSendTimeout})
→ Future<Either<NetworkError, dynamic>>
-
override
-
toString()
→ String
-
A string representation of this object.
inherited