updateDepartment method
Update a department
This function sends a request to the API client to update a department. If the request is successful, it returns void. In case of an error, the error is recorded in Crashlytics and the error is rethrown.
Implementation
Future<void> updateDepartment(Department department) {
assert(department.id != null);
return _apiClient
.updateDepartment(department.id!, department.toJson())
.catchError((error) {
_crashlytics?.recordError(error, StackTrace.current);
throw error;
});
}