I’m pretty new in flutter. So bear with me. I’m not sure the difference between plugin “camera” and “image picker”. I was able to capture video and image by using “image picker”. From my perspective,”image picker” is more straightforward and easy to implement but on the internet, seems like “camera” plugin is more popular. Then I want to ask, when it comes to taking video and picture, especially video. Is there any pros and cons? Any help appreciated!
expo-image-picker provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.
A React Native module that allows you to select a photo/video from the device library or camera.
Flutter comes with an image picker plugin for picking images from the device gallery or taking new pictures from the camera. The image_picker plugin exposes some helpful methods from the ImagePicker class it exports: import 'package:image_picker/image_picker. dart'; ImagePicker picker = ImagePicker();
The two plugins differ in functionality and most importantly in purpose:
camera
allows you to embed the camera feed into your own application as a widget, i.e. have control over it as well.
The image_picker
plugin will launch a different application (a camera or gallery application) and return a File
(an image or video file selected by the user in the other application) to your own application.
If you want to implement (and customize) the camera for you own purposes, you will have to use camera
, but if you only want to retrieve imagery or video from the user, image_picker
will be your choice.
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