backupLocale property

Locale? get backupLocale

Supply the 'backup' Locale if any.

Implementation

static Locale? get backupLocale {
  if (_backupLocale == null) {
    if (supportedLocales.length > 1) {
      // Assume the second Locale a suitable backup.
      _backupLocale = _supportedLocales[1];
    } else {
      _backupLocale = locale;
    }
  }
  return _backupLocale;
}
set backupLocale (Locale? locale)

Implementation

static set backupLocale(Locale? locale) {
  if (locale != null) {
    // Only assign once.
    _backupLocale ??= locale;
  }
}