Questions tagged [imagepicker]
462 questions
4
votes
2 answers
Flutter: Using try/catch inside Future function
In my application I want to take image with camera, and I'm using image_picker library for that.
Here is my code:
import 'dart:io';
import 'package:image_picker/image_picker.dart';
Future getImage() async {
var image = await…

Alena
- 1,134
- 6
- 19
- 45
3
votes
1 answer
Expo-image-picker: "Unhandled promise rejection: Error: Failed to write data to a file"
I am building a react native multiuser app and I am trying to set up the user profile page. I am trying to make a user profile picture that a user can upload from their image library. I manage to open the image gallery but when I select an image I…

Itay Lador
- 313
- 1
- 10
3
votes
2 answers
Flutter Image Picker problem on iOS, pop-up with "Select more photos" even if I want to select only one, the image is not added
I am using Image Picker to select an image from the gallery. When I don't have any images uploaded, after I add one image, this pop-up is appearing as shown below.
If I press "Select More Photos...", the image or images are not added after…

Roland Iordache
- 325
- 4
- 20
3
votes
2 answers
Trouble asking for permission with Expo Image Picker
I am trying to use Expo-image-picker with a react-native application. Here is my code:
const openCamera = async () => {
const permissionResult = await ImagePicker.requestCameraPermissionsAsync();
if (permissionResult.granted === false) {
…

Ben
- 75
- 1
- 5
3
votes
0 answers
How to create a circular crop mask for images in React Native
I've created a custom image picker using expo-media-library, and now I want to create a circular image crop mask, like on instagram or whatspp when you change the profile picture.
I found this package,…

PietroPutelli
- 482
- 4
- 20
3
votes
2 answers
Flutter image picker doesn't pick some images on iOS
I'm trying to pick image from gallery and it works fine. But if the image's extension is webp it's not picking it. So I can't handle the error. Cause it's not throws an error about it. Here is my code snippet:
try {
final XFile? image = await…

bsgal
- 313
- 2
- 13
3
votes
4 answers
A value of type 'XFIle' can't be assigned to a variable of type 'File' error
I am using image_picker: ^0.8.4+4 where I am getting this error. what I can do to make this code right?
late File selectedImage;
bool _isLoading = false;
CrudMethods crudMethods = CrudMethods();
Future getImage() async {
var image = await…

Mohit Saini
- 33
- 1
- 1
- 4
3
votes
1 answer
Flutter throws dependency error not flutter 2
I have a flutter project that uses imagepicker as a pub package, when I run the project I get the following error, this happened to me after I changed my mac to m1, I have already followed several guides about it but I can't solve it, pod packages…

riki
- 1,502
- 5
- 17
- 45
3
votes
0 answers
Very weird bug where sheet cover is not working in Swift iOS 14.1-ios 14.4 but working for iOS 14.5 and above
this bug has been scratching my head for the past few days and I still don't know why the problem is arising and what the fix is. I have a camera screen and integrated it with the TOCropViewController…

krish
- 37
- 2
- 10
3
votes
3 answers
Why is ImagePicker unable to pick multiple images
I'm trying to pick multiple images at once using the image_picker 0.7.5+3 package
so my code is simple , just one line to open the gallery to select from it
final images = await ImagePicker.platform.pickMultiImage();
but it's showing this…

Tony Tony
- 33
- 1
- 3
3
votes
4 answers
Flutter image picker not working in ios 14 with Mac M1 chip simulator
Image picker appears with list of images , but cannot pick an image from list. I have already added camera permission to plist file. It working in real device with ios 12.6. I am using ios 14 simulator in Mac M1 machine.

Graycodder
- 447
- 5
- 15
3
votes
1 answer
How do I make two separate calls to an Imagepicker in SwiftUI?
I want users to be able to upload two separate images to two different parts of the same view.
I'm able to get the first image to show correctly at the top. But whenever the user adds the second image, the image at the top is updated again instead…

Buckiteer
- 33
- 2
3
votes
1 answer
No persistable permission grants found for UID 10208 [ Security Exception ]
I am using Storage Access Framework for Image Picker in my app. Below is the code
val types = arrayOf("image/png", "image/jpeg", "image/jpg")
val intent = Intents.createDocumentIntent(types, true)
if (canDeviceHandle(intent))…

FiXiT
- 769
- 1
- 12
- 27
3
votes
1 answer
How to use imagepicker library to pick video from gallery
I am using image_picker: ^0.6.7+22, when I use the library to select a video from gallery only photos appear. There is no way to select a video from my gallery.
final video = await picker.getVideo(source: ImageSource.gallery);

Tamim Chowdhury
- 97
- 1
- 8
3
votes
3 answers
The method 'copy' isn't defined for the type 'PickedFile'
After i upgraded Flutter i followed all the steps for migration code and now i get this error, can't use to .Copy.
class ImageInput extends StatefulWidget {
final Function onSelectImage;
ImageInput(this.onSelectImage);
@override
…

ana_berani
- 31
- 1
- 3