loadTranslations method
Loads translations for the given locale and set of translation keys.
locale
is the locale for which to load translations.
translations
is a set of translation keys to load.
context
is the build context, used to mark
the widget tree as needing a rebuild.
Implementation
Future<void> loadTranslations(Locale locale, Set<String> translations,
[BuildContext? context]) async {
Map<String, dynamic> newTrs = await loader.loadTranslations(locale,
supportedLocales: supportedLocales, trs: translations);
_localizedStrings.addAll(newTrs);
if (context != null) {
(context as Element).markNeedsBuild();
}
}