changeEnableSchedule method

Future<void> changeEnableSchedule(
  1. String nodeId,
  2. String id,
  3. ScheduleEnableOperation operation
)

Helper function for change the enable status of a default Rainmaker schedule.

Implementation

Future<void> changeEnableSchedule(
    String nodeId, String id, ScheduleEnableOperation operation) async {
  await updateState(nodeId, {
    'Schedule': {
      'Schedules': [
        {
          'id': id,
          'operation': operation.toShortString(),
        }
      ],
    }
  });
}