Posts

Showing posts with the label directory

[Flutter] Get some special directories path

Image
I'm sure, if you are a Flutter's developer, that you will need one day to get specific paths, for instance to store files, generate temporary files etc... Path_provider package For that I use the 'path_provider' package that has some helpers methods. For example: Future < Directory >   getApplicationDocumentsDirectory ( ) returns the documents directory. How to use it ? Directory tempDir = await getTemporaryDirectory(); String tempPath = tempDir.path; Directory appDocDir = await getApplicationDocumentsDirectory(); String appDocPath = appDocDir.path; Follow the links: Package:  https://pub.dev/packages/path_provider Package's documentation:  https://pub.dev/documentation/path_provider/latest/index.html