This commit is contained in:
@@ -15,9 +15,13 @@ class MyTranslations extends Translations {
|
||||
static Future<void> loadTranslations() async {
|
||||
final locales = ['en_US', 'de_DE', 'fr_FR', 'nl_NL'];
|
||||
for (final locale in locales) {
|
||||
final String jsonString = await rootBundle.loadString('assets/i18n/$locale.json');
|
||||
final String jsonString = await rootBundle.loadString(
|
||||
'assets/i18n/$locale.json',
|
||||
);
|
||||
final Map<String, dynamic> jsonMap = json.decode(jsonString);
|
||||
_translations[locale] = jsonMap.map((key, value) => MapEntry(key, value.toString()));
|
||||
_translations[locale] = jsonMap.map(
|
||||
(key, value) => MapEntry(key, value.toString()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user