import 'dart:async'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; // ignore_for_file: non_constant_identifier_names // ignore_for_file: camel_case_types // ignore_for_file: prefer_single_quotes //This file is automatically generated. DO NOT EDIT, all your changes would be lost. class S implements WidgetsLocalizations { const S(); static const GeneratedLocalizationsDelegate delegate = GeneratedLocalizationsDelegate(); static S of(BuildContext context) => Localizations.of(context, WidgetsLocalizations); @override TextDirection get textDirection => TextDirection.ltr; } class en extends S { const en(); } class GeneratedLocalizationsDelegate extends LocalizationsDelegate { const GeneratedLocalizationsDelegate(); List get supportedLocales { return const [ const Locale("en", ""), ]; } LocaleResolutionCallback resolution({Locale fallback}) { return (Locale locale, Iterable supported) { final Locale languageLocale = new Locale(locale.languageCode, ""); if (supported.contains(locale)) return locale; else if (supported.contains(languageLocale)) return languageLocale; else { final Locale fallbackLocale = fallback ?? supported.first; return fallbackLocale; } }; } @override Future load(Locale locale) { final String lang = getLang(locale); switch (lang) { case "en": return new SynchronousFuture(const en()); default: return new SynchronousFuture(const S()); } } @override bool isSupported(Locale locale) => supportedLocales.contains(locale); @override bool shouldReload(GeneratedLocalizationsDelegate old) => false; } String getLang(Locale l) => l.countryCode != null && l.countryCode.isEmpty ? l.languageCode : l.toString();