I followed the guide on localization and it is working great. But I would like the user to be able to change to a locale in the app that is different from the local of the device. Can I somehow just set the locale for the app and have the entire app switch to using this locale?
I tried experimenting with "localeResolutionCallback" but without luck. Any ideas on how I can do this?
Thank you
Søren
The is no need to use localeResolutionCallback.
You can simply specify the locale like this:
Then you can provide the user a list of Locales to choose and create a function like this to update the app Locale:
}
To call setLocale(), you can use provider or findAncestorStateOfType to expose the initial Widget (it should be stateful)
Best regards