CustomApiServices class
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
-
cancelAllRequests()
→ void
-
-
cancelRequest(String method, String url)
→ void
-
-
clearAuthToken()
→ void
-
-
clearCache()
→ Future<void>
-
-
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
-
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>>
-
-
uploadSingleFile({required String url, required String filePath, String fileKey = 'file', Map<String, dynamic>? formData, bool useWithoutToken = false, bool cacheResponse = false, bool forceOffline = false, CancelToken? cancelToken, void onSendProgress(int, int)?, void onProgressPercentage(double progress)?})
→ Future<String>
-