localeResolutionCallback property

  1. @override
Locale Function(Locale? locale, Iterable<Locale> supportedLocales) localeResolutionCallback
override

Default locale resolution used by states_rebuilder.

It first research for an exact match of the chosen locale in the list of supported locales, if no match exists, it search for the language code match, if it fails the first language is the supported language will be used.

for more elaborate logic, use MaterialApp.localeListResolutionCallback and define your logic.

Implementation

@override
Locale Function(Locale? locale, Iterable<Locale> supportedLocales)
    get localeResolutionCallback => (locale, __) {
          return _locale!;
        };