masonry_gallery library
A Flutter package to display images in a responsive masonry layout.
Supports:
- Network and Asset images
- Custom number of columns
- Custom spacing and border radius
- Tap callback for each image
Example:
MasonryGallery(
images: [
'https://example.com/image1.jpg',
'assets/local_image.png',
],
columnCount: 3,
spacing: 4,
borderRadius: BorderRadius.circular(12),
onTap: (img) {
print('Tapped: $img');
},
)
Classes
- MasonryGallery
- A widget that displays a list of images in a masonry layout.