LocaleResolutionCallback typedef

Locale LocaleResolutionCallback (Locale locale, Iterable<Locale> supportedLocales)

The signature of WidgetsApp.localeResolutionCallback.

A LocaleResolutionCallback is responsible for computing the locale of the app's Localizations object when the app starts and when user changes the default locale for the device.

The locale is the device's locale when the app started, or the device locale the user selected after the app was started. The supportedLocales parameter is just the value of WidgetsApp.supportedLocales.

Implementation

typedef LocaleResolutionCallback = Locale Function(Locale locale, Iterable<Locale> supportedLocales);