CustomApiServices class
Methods
-
cancelAllRequests()
→ void
-
-
cancelRequest(String method, String url)
→ void
-
-
clearAuthToken()
→ void
-
-
clearCache()
→ Future<void>
-
-
globalApisGetResponseDio({required String apiUrl, required Map<String, dynamic> request, bool showSuccessMessage = false, bool showErrorMessage = true, bool showPrints = false, bool load = false, bool jsonConversion = true, ApiMethod apiMethod = ApiMethod.post, CancelToken? cancelToken})
→ Future<Response?>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
request({required ApiMethod method, required String url, dynamic requestData, void authTokenCallback()?, Map<String, dynamic>? queryParameters, bool useWithoutToken = false, bool cacheResponse = false, Duration cacheDuration = const Duration(minutes: 30), bool forceOffline = false, CancelToken? cancelToken, void onSendProgress(int, int)?, void onReceiveProgress(int, int)?, BuildContext? context, bool showSuccessMessage = false, bool showErrorMessage = true, bool showErrorLog = true, bool showSuccessLog = true})
→ Future<ResponseModal>
-
-
requestAsync({required ApiMethod method, required String url, dynamic requestData, Map<String, dynamic>? queryParameters, bool useWithoutToken = false, bool cacheResponse = false, Duration cacheDuration = const Duration(minutes: 30), bool forceOffline = false, CancelToken? cancelToken, void onSendProgress(int sent, int total)?, void onReceiveProgress(int received, int total)?, void onProgressPercentage(double progress)?})
→ Future<ResponseModal>
-
-
setAuthBearerToken(String token)
→ void
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
uploadMultipartWithData({required String url, Map<String, dynamic>? body, Map<String, dynamic>? files, CancelToken? cancelToken, void onProgressPercentage(double progress)?})
→ Future
-
-
uploadMultipleFiles({required String url, required List<String> filePaths, String fileKey = 'files', Map<String, dynamic>? formData, bool useWithoutToken = false, bool cacheResponse = false, bool forceOffline = false, CancelToken? cancelToken, void onSendProgress(int, int)?, void onProgressPercentage(double progress)?})
→ Future<List<String>>
-