I want to access the gallery and pick image or video on user choice.
I am building an app where user can upload image or video when they click on the gallery icon. I have used ImagePicker but with ImagePicker I will have to make two separate icon for photo and video. I just want one icon for accessing the gallery and to get video or photo in return.
IconButton(
icon: Icon(FontAwesome5.getIconData('file-video')),
iconSize: 52.0,
onPressed: () =>
ImagePicker.pickVideo(source: ImageSource.gallery),
)
For accessing to camera and video with only on click you have to use extension "camera" from pub.dev not "image_picker".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With