deviceTimezoneChangeDebounceMinutes property

int get deviceTimezoneChangeDebounceMinutes

Debounce interval in minutes when timezone/offset has changed.

When the device detects a timezone or offset change, it will wait at least this long before syncing another change. This prevents rapid flapping when users are near timezone boundaries or experiencing network issues.

Can be set via:

  • Code: AppConfigBase.deviceTimezoneChangeDebounceMinutesDefault = 5
  • Build flag: --dart-define dreamic_device_timezone_change_debounce_minutes=5
  • Firebase Remote Config: dreamic_device_timezone_change_debounce_minutes

Default: 10

Implementation

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