Where does SharedPreferences save local data on Windows? Like where is the path? I am referring to this:
final prefs = await SharedPreferences.getInstance();
var myData = prefs.getString('myData');
Thanks
According to the Shared Preferences documentation, it's stored in the local AppData folder for Windows.
From a scan of the code for the Windows platform interface, this seems to be the path obtained by pathProvider.getApplicationSupportPath(). You could call this in your code to get the specific path of where the file is stored.
Flutter stores the shared pref key-value pairs in the location Users\YOUR-USER-NAME\AppData\Roaming\com.COMPANYNAME\APPNAME\shared-preferences.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With