Android 12+: Changing wallpaper or dark theme breaks Flutter and Jetpack Apps
github.com
github.com
I'm not very familiar with Flutter development, but it appears there is some library support to handle this gracefully [1]. Good luck.
[1] https://docs.flutter.dev/platform-integration/android/restor...
One of the most popular issues is when the user is using the app (text editing) and then they toggle dark mode from the status bar, not necessarily leaving the app, causing the app to lose context in native or restart in Flutter.
This isn't an issue on all other platforms including iOS, and it's heavily used by many users.
I guess one of the solutions is to add a dark mode button that is visible all the time inside the app.
Android delays dark mode if enabled automatically after locking the screen.