currentLocale static method
Same as get locale
, but this can be invoked from widgets
Implementation
static Locale? currentLocale(final BuildContext context) {
final FlutterI18n? currentInstance = _retrieveCurrentInstance(context);
return currentInstance?.translationLoader?.locale;
}