translate static method
Facade method to the simple translation logic
Implementation
static String translate(final BuildContext context, final String key,
{final String? fallbackKey,
final Map<String, String>? translationParams}) {
final FlutterI18n currentInstance = _retrieveCurrentInstance(context)!;
final SimpleTranslator simpleTranslator = SimpleTranslator(
currentInstance.decodedMap,
key,
currentInstance.keySeparator,
fallbackKey: fallbackKey,
translationParams: translationParams,
missingKeyTranslationHandler: (key) {
currentInstance.missingTranslationHandler(key, currentInstance.locale);
},
);
return simpleTranslator.translate();
}