A simple flutter widget that displays Image widgets in a lively layout.
- 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.
flutter pub add image_grid_layoutflutter pub add image_grid_layoutSimply 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.

