locales property
override
The full system-reported supported locales of the device.
This establishes the language and formatting conventions that application should, if possible, use to render their user interface.
The list is ordered in order of priority, with lower-indexed locales being preferred over higher-indexed ones. The first element is the primary locale.
The onLocaleChanged callback is called whenever this value changes.
See also:
- WidgetsBindingObserver, for a mechanism at the widgets layer to observe when this value changes.
Implementation
@override
List<Locale> get locales => _localesTestValue ?? _platformDispatcher.locales;