locale property

Locale locale
override

The system-reported default locale of the device.

This establishes the language and formatting conventions that application should, if possible, use to render their user interface.

This is the first locale selected by the user and is the user's primary locale (the locale the device UI is displayed in)

This is equivalent to locales.first and will provide an empty non-null locale if the locales list has not been set or is empty.

Implementation

@override
Locale get locale => _localeTestValue ?? _window.locale;