put<T> method
Future<HttpResponse<T> >
put<T>(
- String uri, {
- dynamic data,
- Map<
String, dynamic> ? queryParameters, - Options? options,
- CancelToken? cancelToken,
- HttpTransformer? httpTransformer,
- bool isShowLoading = true,
Implementation
Future<HttpResponse<T>> put<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.put(
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);
}
}