load static method

Future<S> load(
  1. Locale locale
)

Implementation

static Future<S> load(Locale locale) {
  final name = (locale.countryCode?.isEmpty ?? false)
      ? locale.languageCode
      : locale.toString();
  final localeName = RealIntl.Intl.canonicalizedLocale(name);
  Intl.fixMessageLookup = getMessageLookup(localeName)!;
  return initializeMessages(localeName).then((_) {
    RealIntl.Intl.defaultLocale = localeName;
    final instance = S();
    S._current = instance;

    return instance;
  });
}