Home > Net >  Flutter SharedPreferences Windows location
Flutter SharedPreferences Windows location

Time:05-11

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

CodePudding user response:

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.

  • Related