CarnegieTechnologies / gallery_saver

Flutter plugin that saves images and videos to devices gallery
Apache License 2.0
157 stars 328 forks source link

How to save other file format other than video or image ? #175

Open premingiet opened 2 years ago

premingiet commented 2 years ago

i have a custom file format which i wish to export to gallery. How i do that ? Because currently it only supports video and images.

kostov commented 2 years ago

Moreover, it only supports just several file extensions to treat them as photos and videos. These extensions are:

const List<String> videoFormats = [
  '.mp4',
  '.mov',
  '.avi',
  '.wmv',
  '.3gp',
  '.3gpp',
  '.mkv',
  '.flv',
  '.ts'     // I just added that :(
];
const List<String> imageFormats = [
  '.jpeg',
  '.png',
  '.jpg',
  '.gif',
  '.webp',
  '.tif',
  '.heic'
];

I don't think this is an adequate strategy. Why don't you want to assign the verification of what is a picture or video -- to the plugin user?