updateApplication method
Future<Response?>
updateApplication({
- required Announcement data,
- GeneralCallback<
Response> ? callback,
Implementation
Future<Response<dynamic>?> updateApplication({
required Announcement data,
GeneralCallback<Response<dynamic>>? callback,
}) async {
try {
final Response<dynamic> response = await dio.put(
'/application/${data.applicationId}',
data: data.toUpdateApplicationJson(),
);
if (callback != null) {
callback.onSuccess(response);
}
return response;
} on DioException catch (dioException) {
if (callback == null) {
rethrow;
} else {
handleCrudError(dioException, callback);
}
}
return null;
}