This project is a for Flutter localization.
dependencies:
flutter:
sdk: flutter
flutter_localizations: //new
sdk: flutter //new
supportedLocales: [const Locale('gu', 'GU'), const Locale('en', 'US')],
localizationsDelegates: [
const DemoLocalizationsDelegate(),
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate
],
localeResolutionCallback:
(Locale locale, Iterable<Locale> supportedLocales) {
for (Locale supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode ||
supportedLocale.countryCode == locale.countryCode) {
return supportedLocale;
}
}
return supportedLocales.first;
},
flutter:
uses-material-design: true
assets: //new
- resources/lang/gu.json //new
- resources/lang/en.json //new