Flutter How to show gallery images in grid view

21,362

What your trying to achieve is pretty complex(folder location,reading the files stored there, identifying the once you would like to display...)

There are two options:

Use this plugin if your not making an app specifically to access photos stored in the users phone without having your own UI

https://pub.dev/packages/image_picker

If your developing an app specifically for accessing photos stored in the user's phone (with own UI)

The below links might help you:

https://pub.dev/packages/image_gallery

https://pub.dev/packages/photo_view

There is even a widget for displaying mutliple widgets in the form of a grid called as GridView.

I would recommend breaking your problem into parts and then ask each of them individually in the form of multiple questions because your basically in a way asking an entire model for an app which would require a lot of explanation.

Share:
21,362

Related videos on Youtube

Zain Abedien
Author by

Zain Abedien

Updated on January 29, 2021

Comments

  • Zain Abedien
    Zain Abedien about 3 years

    I tried everything to show gallery images in grid view in a flutter. But I couldn't find any appropriate method.

  • Zain Abedien
    Zain Abedien about 5 years
    I have to add images from the gallery. Images are not in my assets.
  • Thomas Nicole
    Thomas Nicole about 5 years
    Oops, sorry my bad. Did you try to make the list with this plugin ? pub.dartlang.org/packages/flutter_multiple_image_picker
  • Rebar
    Rebar about 4 years
    The problem with image_gallery is, that it is exceeding memory, because it's loading ALL Images at once! No broadcasting or streaming of MethodChannel! I definetly don't recommend it!