delete<T> method
Future<HttpResponse<T> >
delete<T>(
- String uri, {
- dynamic data,
- Map<
String, dynamic> ? queryParameters, - Options? options,
- CancelToken? cancelToken,
- HttpTransformer? httpTransformer,
- bool isShowLoading = true,
Implementation
Future<HttpResponse<T>> delete<T>(String uri,
{data,
Map<String, dynamic>? queryParameters,
dio.Options? options,
dio.CancelToken? cancelToken,
HttpTransformer? httpTransformer,
bool isShowLoading = true}) async {
try {
if(isShowLoading) EasyLoading.show(status: 'loading...');
var response = await _dio.delete(
uri,
data: data,
queryParameters: queryParameters,
options: options,
cancelToken: cancelToken,
);
if(isShowLoading) EasyLoading.dismiss();
return handleResponse(response, httpTransformer: httpTransformer);
} on Exception catch (e) {
return handleException(e);
}
}