I struggle to find some package...
is there some way how to ask for some good default storage location? (Config and ini files...) As flutter gives me the possibility to run on all possible platforms I would like a really simple cross-platform solution. Something that would give me /home/user for linux, /Users/user for osx ... without worrying about plaform.
CodePudding user response:
Try the Path_Provider package: https://pub.dev/packages/path_provider
add this to your pubspec.yaml:
path_provider: ^2.0.11
get default storage:
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;