[Flutter] Sample Code for Displaying Images Taken with Camera App

Tadashi Shigeoka ·  Tue, March 10, 2020

I’ll introduce Flutter sample code for displaying images taken with the camera app.

Flutter

Prerequisites

Reference Information) Implementing Flutter Device Image Display

Based on the following article from the Flutter official documentation, I implemented the functionality to display images taken with the camera app.

Using ImagePicker.pickImage(source: ImageSource.camera)

The official documentation image_picker | Flutter Package includes sample code for displaying images taken with the camera as shown below, so I’ll implement it exactly as shown.

var image = await ImagePicker.pickImage(source: ImageSource.camera);

If you want to display device images, please refer to this article.

Flutter Camera App Image Display Sample Code

The sample code for displaying images taken with the camera app in a Flutter app is published in the following GitHub Pull Request, so please take a look.

👉 Display the image from camera app using image_picker · Pull Request #14 · codenote-net/flutter_sandbox

image_picker camera | Flutter

That’s all from the Gemba.