Questions tagged [flutter-image-picker]
75 questions
0
votes
0 answers
How to select an image and add it to a list in dart?
There is a part in my app that users can pick multiple images from their device. I use image_picker package to do this.After selecting images,they are listed and showed to the user.By tapping on each image, user can edit (like putting text on the…

taha kalaee
- 133
- 5
0
votes
1 answer
Set value File from picture in Flutter
I have so many data to send to my backend. I made a class for all data I need. I named it service_data and it contains
class ServiceData {
File? fileBukuServis;
File? fileSTNK;
File? fileOwnerManual;
}
after that, I want to pick image from…

Mifta Khussolikhin
- 47
- 1
- 6
0
votes
0 answers
Why does Flutter Image Picker take 2-3 seconds to capture an image from the camera on Android?
Flutter Image picker is taking a while to capture image from camera on android
When I try to pick image using image_picker package , camera open file , but when I click capture button it takes about 2 or 3 seconds to capture image , any solutions…

Ahmed Ashraf
- 125
- 1
- 8
0
votes
2 answers
Flutter image_picker package installation throws error "version solving failed."
I am trying to install Flutter package "image_picker". When I run flutter pub add image_picker I get the following error:
The current Dart SDK version is 3.0.1.
Because image_picker <0.7.0-nullsafety doesn't support null safety and image_picker…

user1543784
- 271
- 2
- 4
- 19
0
votes
0 answers
Package MIME returning wrong extension
All file images are returning jpeg. How to solve this and get the correct MIME type.
Flutter doctor - no issues
Flutter 3.7.7
pubspec.yaml
...
image_picker: ^0.8.7+5
mime: ^1.0.4
...
Future chooseImage() async {
var chosenImage = await…

Rod Rodrigues
- 53
- 1
- 9
0
votes
1 answer
How to get the path of an image in Flutter web?
I'm using image_picker in my Flutter app. When I test my app in Flutter web, it says I can't use path parameter in Flutter web.
However, I need to get the path of the image. How to do it?
I googled this, I asked Google Bard and ChatGPT, but didn't…

My Car
- 4,198
- 5
- 17
- 50
0
votes
0 answers
Image from Image Picker in Null for the First Time after Permission
I'm using image_picker, and I've noticed something weird on Android, that is when I pick an image for the first time (Right after giving permission to storage), it returns null.
Here's my function for picking image. Here are the steps that is…

ASAD HAMEED
- 2,296
- 1
- 20
- 36
0
votes
1 answer
error The argument type 'File?' can't be assigned to the parameter type 'File'
How do I fix it? Changed the variables and it still shows an error. As before, there is a line on getimage, how do I change it? The argument type 'File?' can't be assigned to the parameter type 'File'.enter image description here
I hope you guys can…

chitsanuphong game
- 21
- 4
0
votes
0 answers
ERROR:flutter/runtime/dart_vm_initializer.cc(41) Unhandled Exception: Null check operator used on a null value
I am getting error as described in image. You can check error with line.
Actually, I am trying to add two options in modalBottomSheet. the first is Camera and second is Gallery. Then if gallery is selected so, I want to navigate to the StatusImage()…

pnpatel
- 9
- 3
0
votes
1 answer
The flutter image_picker plugin restarts the app every time when an image is picked on Redmi Note 9
This happens only in Redmi Note 9. I've read the image_picker documentation and it says this occurs when there is not enough memory in the device and it causes to restart of the MainActivity in the Flutter app. But the device has enough memory.
Is…

Imesh Jeewantha
- 11
- 2
0
votes
3 answers
How can I fix the error a value of type 'XFile?' can't be assigned to a variable of type 'File'
The error is this : A value of type 'XFile?' can't be assigned to a variable of type 'File'. I tried changing the type of the variable "picture", from File to XFile, and it gives me this error instead: A value of type 'XFile?' can't be assigned to a…

Gonzalo Garcia
- 25
- 2
0
votes
1 answer
"Instance member 'pickImage' can't be accessed using static access." error in flutter
I have ran into a problem concerning my Flutter app , to use select picture from gallery in Flutter and pickImage is underlined and had this "Instance member 'pickImage' can't be accessed using static access." error. How to fix this error.
This is…

Lisa
- 25
- 4
0
votes
1 answer
The argument type 'XFile' can't be assigned to the parameter type 'Uint8List'
I try to upload an image to firebase storage:
First: Pick an image as XFile using image_picker: ^0.8.6 package.
Second: use UploadTask method to upload the XFile to the storage.
But I got (The argument type 'XFile' can't be assigned to the parameter…

Miss H
- 35
- 5
0
votes
1 answer
How to convert image Xfile to URL in flutter?
in my flutter App, I am using ana Image picker,
now I want to update the current user photoUrl(Firebase auth) but I don't know how to convert a file to Url?
Any idea??
final XFile? image = await ImagePicker().pickImage(source: ImageSource.gallery);

MohBoudraa
- 13
- 3
0
votes
0 answers
Flutter iOS app rejected by App Store Connect because image picking from gallery crashed app with image_picker package
I am using image picker package to get image from camera or gallery. Most of the times it is working when I test it on real device, I run into that issue twice. it gave me this error App store rejected my app due to this crash with Guideline 2.1 -…

Yaren Albayrak
- 51
- 3