modalPut method
dynamic
modalPut({})
Implementation
modalPut({
required String url,
required T dataModel,
T Function(Map<String, dynamic>)? parseMethod,
}) async {
try {
Response response = await dio.put(url);
printingResponse(response);
return BaseResponse<T>.fromJson(await dataResponseByStatus(response),
parseMethod: parseMethod);
} catch (e) {
if (e is DioException) {
await networkErrors(e);
throw CustomException(e.response!.data.toString());
}
}
return null;
}