I'm using this to return the video file but I got .jpg
Future<File> getVideo() async {
var video = await ImagePicker.pickVideo(
source: ImageSource.gallery);
return video;
}
I want to ImagePicker.pickVideo()
return video file instead of .jpg file so I can upload this file to firebase, how can I achieve that?
I'm assuming that you're using the package: https://pub.dev/packages/image_picker
pickVideo() method has been decrecated, and you will need to replace these apis with getVideo()
As explained the repositories' documentation: https://github.com/flutter/plugins/tree/master/packages/image_picker/image_picker
Write this:
However I would suggest to use this package as an alternative: https://pub.dev/packages/flutter_document_picker
This package will allow you to select all videos on the device, including those taken from a users' Google Drive or iCloud providers. In this case write this:
You will need to make sure that the Mimes and Uti types for videos on iOS & Android are set correctly.