I am trying to build an application in which the user can upload videos and pictures. So far the only way I have found was with the image_picker package. But in the package you have to declare first if you want to upload a picture or video. That seems kind of unprofessional in my opinion. Is there a way to do both at once?
final XFile? image = await _picker.pickVideo(source: ImageSource.gallery);
final XFile? image = await _picker.pickImage(source: ImageSource.gallery);
looking for:
final XFile? imageOrVideo = await _picker.pickFile(source: ImageSource.gallery);