start method

void start()

Implementation

void start() {
  Workmanager().registerPeriodicTask(
    "sync-task-identifier",
    "sync-task",
    initialDelay: const Duration(minutes: 30),
    frequency: const Duration(hours: 3),
    existingWorkPolicy: ExistingWorkPolicy.keep,
    constraints: Constraints(
      networkType: NetworkType.connected,
    ),
  );
}