LocaleListResolutionCallback typedef
The signature of WidgetsApp.localeListResolutionCallback.
A LocaleListResolutionCallback is responsible for computing the locale of the app's Localizations object when the app starts and when user changes the list of locales for the device.
The locales
list is the device's preferred locales when the app started, or the
device's preferred locales the user selected after the app was started. This list
is in order of preference. If this list is null or empty, then Flutter has not yet
recieved the locale information from the platform. The supportedLocales
parameter
is just the value of WidgetsApp.supportedLocales.
See also:
- LocaleResolutionCallback, which takes only one default locale (instead of a list) and is attempted only after this callback fails or is null. LocaleListResolutionCallback is recommended over LocaleResolutionCallback.
Implementation
typedef LocaleListResolutionCallback = Locale Function(List<Locale> locales, Iterable<Locale> supportedLocales);