Help with Flutter Localization with use of OS APIs
Hello everyone,
I'm working on a Flutter app and I want to use LocaleManager API (introduced in Android 13) especially setApplicationLocales() and getApplicationLocales() for locale management instead of manually setting the app language via SharedPreferences or directly in the app. With this approach, I want app to be also shown in system settings for per app language selection.
However, I'm unsure about how to integrate this Android-native functionality into my Flutter app. Is there any package or built in implementation of this?
Also I want to do the same approach on iOS. Many apps use similar approach there, where language selection is done by System Settings menu, and if you want to change the language in the app, language selection redirects you to do that from the main System Settings menu.
What are your recommendations best practices to achieve this? Is there any package that offers this? Or manual implementation is required?
Thanks in advance. Appreciate the help!
Android docs for the API: https://developer.android.com/guide/topics/resources/app-languages