deleteExerciseScheduleApi function

Future<void> deleteExerciseScheduleApi({
  1. required BuildContext context,
  2. required int id,
})

Delete the remote exercise schedule on the generator with the given id using the underlying backend API calls

Implementation

Future<void> deleteExerciseScheduleApi({
  required BuildContext context,
  required int id,
}) async {
  final container = ProviderScope.containerOf(context, listen: false);

  final api = await container.read(energyManagementV3ApiProvider.future);
  final response = await api.kemApiV3DevicesIdExerciseDelete(id: id);

  assertSuccessfulResponse(response);
}