Home > front end >  How to get Temporary Storage Directory in flutter?
How to get Temporary Storage Directory in flutter?

Time:09-25

I am creating a video app. So it generates thumbnail for every video. I want to store these thumbnail in local Storage of device(only temporary). So I want to get temporary path/Directory in device, where thumbnail will be stored. But I want to delete those thumbnails from Storage when user closes the app.

If you know the answer please answer the Question.

CodePudding user response:

you can use path_provider , link

Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;

Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;
  • Related