getNextSyncDuration method

Future<Duration?> getNextSyncDuration()

Gets the Duration until the next scheduled auto-sync as a Future.

Returns null if no auto-sync is currently scheduled.

Implementation

Future<Duration?> getNextSyncDuration() async {
  final nextTime = await getNextSyncTime();
  if (nextTime == null) return null;
  return nextTime.difference(DateTime.now());
}