'How to use same SharedPreferences instance when FLUTTER app is on foreground state
I need to access the app shared preferences to save some data from push notification,
SharedPreferences prefs = await SharedPreferences.getInstance();
above won't get the shared preference instance that use in app state. how can I use same shared preferences for all state of the app.
Solution 1:[1]
I think that you can use this package Flutter Background Service.
It helps to execute dart code in background.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | lasd |
