Skip to content

dl8sd11/flutter_image_grid_layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Grid

A simple flutter widget that displays Image widgets in a lively layout.

Features

  • Layout a grid of images with varying sizes.
  • The images in the same row are scaled to the same height.
  • Randomly assign a different number of images to each row.

Getting started

Add dependency

flutter pub add image_grid_layout

Add import package

flutter pub add image_grid_layout

Usage

Simply pass a List<Image> to the ImageGrid constructor. Set BitFit.fill for the Image to enable image stretching.

ImageGrid(
    images: imageUrls
        .map((e) => Image.network(
                e,
                fit: BoxFit.fill,
            ))
        .toList(),
    minItemPerRow: 2,
    maxItemPerRow: 3,
)

Check out the example for the full demo.

About

A simple flutter widget that displays Image widgets in a lively layout.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published