JobTriggers constructor

JobTriggers({
  1. OnInstallTrigger? onInstall,
  2. OnBootTrigger? onBoot,
  3. IntervalTrigger? interval,
  4. CronTrigger? cron,
  5. MovementTrigger? movement,
  6. ButtonTrigger? button,
  7. NetworkTrigger? network,
  8. PubSubTrigger? pubsub,
})

Implementation

factory JobTriggers({
  OnInstallTrigger? onInstall,
  OnBootTrigger? onBoot,
  IntervalTrigger? interval,
  CronTrigger? cron,
  MovementTrigger? movement,
  ButtonTrigger? button,
  NetworkTrigger? network,
  PubSubTrigger? pubsub,
}) {
  final _result = create();
  if (onInstall != null) {
    _result.onInstall = onInstall;
  }
  if (onBoot != null) {
    _result.onBoot = onBoot;
  }
  if (interval != null) {
    _result.interval = interval;
  }
  if (cron != null) {
    _result.cron = cron;
  }
  if (movement != null) {
    _result.movement = movement;
  }
  if (button != null) {
    _result.button = button;
  }
  if (network != null) {
    _result.network = network;
  }
  if (pubsub != null) {
    _result.pubsub = pubsub;
  }
  return _result;
}