Home > Back-end >  How to create folder in "root directory" with Flutter?
How to create folder in "root directory" with Flutter?

Time:08-10

I made a request to api via ""http"". A list is returned. This list contains the names of the files I want to create. Now I want to use these names when creating files automatically with Flutter. What path should I follow?

CodePudding user response:

Use a directory for the app to store files that only it can access. As a bonus the app doesn't need any additional permissions.

final directory = await getApplicationDocumentsDirectory();

See Read and write files for details.

  • Related