INNER CODE UNIT · Dart
I18n
xuexiangjys/flutter_template · lib/generated/i18n.dart:14
class I18n implements WidgetsLocalizations {
const I18n();
static Locale _locale;
static bool _shouldReload = false;
static set locale(Locale newLocale) {
_shouldReload = true;
I18n._locale = newLocale;
}
static const GeneratedLocalizationsDelegate delegate = GeneratedLocalizationsDelegate();
/// function to be invoked when changing the language
static LocaleChangeCallback onLocaleChanged;
static I18n of(BuildContext context) =>
Localizations.of<I18n>(context, WidgetsLocalizations);