localeOf method - Localizations class - widgets library - Dart API
Locale localeOf(BuildContext context ) The locale of the Localizations widget for the widget tree that corresponds to BuildContext context. If no Localizations widget is in scope then the Localizations.localeOf method will throw an exception. Implementatio
api.flutter.dev