The Example will show about Flutter Show Image From Camera Gallery. This article will creating a simple application using image_picker Package. You can read other article with flutter  in this section :

First, we must create a project using Visual Studio Code software with name “image_show”. Let’s to create a new project using Visual Studio Code:

  1. Invoke View > Command Palette.
  2. Type “flutter”, and select the Flutter: New Project.
  3. Enter a project name, example such as “image_show”, and press Enter.
  4. Create or select the parent directory for the new project folder.
  5. Wait for project creation progress to complete and the main.dart file to appear.

flutter-new-project

Next, add the image_picker package to your project. The image_picker  plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.

Then we click the get package, wait until the process is complete.

After we created pubspec.yaml , You must edit file with name main.dart like below :

So that the application runs on iOS users then add the following script to the ios / Runner / info.plist folder

Then because we delete all the scripts in main.dart we need to change the script rules in widget_test.dart to be like this:

The application can be run to show output below :

flutter_show_image_from_camera_gallery

 

For complete source code you can see in Here.

Thank you for reading this article about Flutter Show Image From Camera Gallery, I hope this article is useful for you. Visit My Github about Flutter in Here.

Flutter Show Image From Camera Gallery

Leave a Reply

Your email address will not be published. Required fields are marked *