Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Images and Video Saved using path_provider not showing in Gallery

Tags:

flutter

I want to record a video or audio in my Flutter App and wants it to appear in gallery. How can I do it because path_provider is saving file to safe location and one need a rooted device to access it. I was trying Flutter Camera Plugin Example

Also asked on https://github.com/flutter/flutter/issues/20807

like image 738
Akash Kumar Seth Avatar asked Aug 20 '18 09:08

Akash Kumar Seth


1 Answers

The reason I was facing the problem is that the example I was trying uses path_provider function "getApplicationDocumentsDirectory()" to store the files. By replacing above Function with "getExternalStorageDirectory()" I am able to store the file in the external directory and they appear in the Gallery.

like image 153
Akash Kumar Seth Avatar answered Oct 16 '22 22:10

Akash Kumar Seth