supportedLocales property

List<Locale>? get supportedLocales

getter, supportedLocales, returns a List of the App's locales. More flexible than an iteration.

Implementation

static List<Locale>? get supportedLocales =>
    _appState?.supportedLocales ??= v.L10n.supportedLocales;
set supportedLocales (List<Locale>? locales)

Implementation

static set supportedLocales(List<Locale>? locales) {
  if (locales != null) {
    if (v.L10n.supportedLocales.isEmpty) {
      v.L10n.supportedLocales = _appState?.supportedLocales ??= locales;
    } else {
      final appLocales = _appState?.supportedLocales ?? [];
      if (appLocales.isEmpty) {
        // Note v.L10n.supportedLocales precedes locales
        _appState?.supportedLocales?.addAll(v.L10n.supportedLocales);
      }
    }
  }
}