1
votes

I'm programming an App in flutter that basicly takes photos and stores them away in some way. At the moment I am using image_picker: ^0.6.7+4. That allows me to click a button 'open camera' which opens the camera I take a photo I press 'ok', the camera pops and voilá the image is stored away the way I want it. To now take another photo I have to repress the button 'open camera' and do it all over again.

I would love to have it slightly different. I want to only once press 'open camera' once, then take as many pictures as I want without pressing 'ok' every time after taking a photo, and finally when I am satisfied with the amount of photos taken then press 'ok' to close the camera and store all those images.

As I am relatively new to flutter I am totaly lost with this task. image_picker seams not to be very modifiable to me, and multi_image_picker only sends me to gallery from where on I can get to the camera, which is not better at all.

I found this package called 'camera' which I don't really understand. Is that maybe the way to go?

Thankfull for help you can offer.

1
did you find a solution to this problem?Masoud H
You can do exactly as described here: flutter.dev/docs/cookbook/plugins/picture-using-camera . Just Alter The part: Navigator.push( context, MaterialPageRoute( builder: (context) => DisplayPictureScreen( // Pass... imagePath: image?.path, ), ), ); To whatever you want to do with picture?.path. E.g you could write a function Future<String> uploadImage(String path). Also see pub.dev/packages/flutter_better_camera wich works exactly the same with extrasaedolfi

1 Answers

0
votes

Ok it is possible with camera and not that hard at all.

All you need to know is explained here:

https://flutter.dev/docs/cookbook/plugins/picture-using-camera