deviceTimezoneUnchangedSyncMinMinutes property

int get deviceTimezoneUnchangedSyncMinMinutes

Minimum interval in minutes between timezone sync attempts when timezone/offset is unchanged.

This throttle prevents unnecessary writes on frequent app resume events. The device will not attempt to sync timezone data more often than this interval unless the timezone or offset actually changed.

Can be set via:

  • Code: AppConfigBase.deviceTimezoneUnchangedSyncMinMinutesDefault = 1440 (24 hours)
  • Build flag: --dart-define dreamic_device_timezone_unchanged_sync_min_minutes=1440
  • Firebase Remote Config: dreamic_device_timezone_unchanged_sync_min_minutes

Default: 2880 (48 hours)

Implementation

static int get deviceTimezoneUnchangedSyncMinMinutes {
  const envValue = int.fromEnvironment(
    'dreamic_device_timezone_unchanged_sync_min_minutes',
    defaultValue: -1,
  );
  if (envValue != -1) {
    return envValue;
  } else {
    final remoteValue =
        g<RemoteConfigRepoInt>().getInt('dreamic_device_timezone_unchanged_sync_min_minutes');
    if (remoteValue > 0) {
      return remoteValue;
    } else {
      return defaultRemoteConfig['dreamic_device_timezone_unchanged_sync_min_minutes'] as int;
    }
  }
}