refresh static method

Future refresh(
  1. BuildContext context,
  2. Locale? forcedLocale
)

Facade method to force the load of a new locale

Implementation

static Future refresh(
    final BuildContext context, final Locale? forcedLocale) async {
  final FlutterI18n currentInstance = _retrieveCurrentInstance(context)!;
  currentInstance.translationLoader!.forcedLocale = forcedLocale;
  await currentInstance.load();
}