Write to a file in local storage flutter

256

If you want to save where the file explorer reaches, you must use the method getExternalStorageDirectory(). It only works in Android and you'll need READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions.

Actually, you're able to find the files saved using getApplicationDocumentsDirectory() and getTemporaryDirectory() as well, but you'd need root access.

Share:
256
heyt0pe
Author by

heyt0pe

Akinlabi Temitope Paul

Updated on December 11, 2022

Comments

  • heyt0pe
    heyt0pe over 1 year

    I know about the path_provider package but it doesn't do what i want, or maybe I'm not just using it right. I read after so many trials and errors that the getApplicationDocumentsDirectory() returns a directory that is accessible only by the app itself, but what if i want to write to a phone's local document directory or so and be able to view the file in my file explorer later on?