INNER CODE UNIT · Dart
AppLocalizations
Furqankhanzada/flutter_eCommerce_ui_kit · lib/localizations.dart:7
class AppLocalizations {
final Locale locale;
AppLocalizations(this.locale);
// Helper method to keep the code in the widgets concise
// Localizations are accessed using an InheritedWidget "of" syntax
static AppLocalizations? of(BuildContext context) {
return Localizations.of<AppLocalizations>(context, AppLocalizations);
}
// Static member to have a simple access to the delegate from the MaterialApp
static const LocalizationsDelegate<AppLocalizations> delegate =
AppLocalizationsDelegate();
late Map<String, String> _localizedStrings;
Future<bool> load() async {