TaskControl constructor

TaskControl({
  1. required int triggerId,
  2. TaskConfiguration? task,
  3. DeviceConfiguration<DeviceRegistration>? targetDevice,
  4. Control control = Control.Start,
})

Create a TaskControl.

taskName and destinationDeviceRoleName are taken from task and targetDevice when given. control defaults to Control.Start.

Implementation

TaskControl({required this.triggerId, this.task, this.targetDevice, this.control = Control.Start}) : super() {
  if (task != null) taskName = task!.name;
  if (targetDevice != null) {
    destinationDeviceRoleName = targetDevice!.roleName;
  }
}