image_select 0.0.1 image_select: ^0.0.1 copied to clipboard
Pick images from device gallery and camera. Alternate of image_picker
Image Selector plugin for Flutter #
A Flutter plugin for Android for picking images from the image library, and taking new pictures with the camera.
Android |
---|
Installation #
First, add image_selector
as a
dependency in your pubspec.yaml file.
Android #
No configuration required.
Example #
File? file;
final ImagePicker picker = ImagePicker();
// Pick an image.
pickImage(ImageFrom source) async {
ImageSelector imageSelector = ImageSelector();
await imageSelector.pickImage(context: context, source: source).then((pickedFile) {
if (pickedFile != null) {
setState(() {
file = pickedFile;
});
}
});
}