useLocale function
return locale from Localizations provider Throws in case Localizations provider is not found within the widget tree scope
useLocale() // Locale()
Implementation
Locale useLocale() {
final context = useContext();
return Localizations.localeOf(context);
}