deviceTimezoneUnchangedSyncMaxMinutes property

int get deviceTimezoneUnchangedSyncMaxMinutes

Maximum interval in minutes for forced timezone refresh even when unchanged.

This ensures timezone offset data is refreshed periodically to catch DST transitions if the app wasn't opened near the transition time. The offset can change even when the IANA timezone string remains the same.

Can be set via:

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

Default: 2880 (48 hours)

Implementation

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