custom_masonry_grid 1.0.2 copy "custom_masonry_grid: ^1.0.2" to clipboard
custom_masonry_grid: ^1.0.2 copied to clipboard

A lightweight, reusable custom masonry grid for Flutter gallery without any external dependencies.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:custom_masonry_grid/custom_masonry_grid.dart';

void main() {
  runApp(const MaterialApp(home: ExampleScreen()));
}

class ExampleScreen extends StatelessWidget {
  const ExampleScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Masonry Grid Example")),
      body: CustomMasonryGrid(
        crossAxisCount: 2,
        padding: const EdgeInsets.all(10),
        items: List.generate(10, (index) {
          return Container(
            height: (index % 2 == 0) ? 150 : 250,
            decoration: BoxDecoration(
              color: Colors.blue[(index + 1) * 100],
              borderRadius: BorderRadius.circular(10),
            ),
            child: Center(child: Text("Item $index")),
          );
        }),
      ),
    );
  }
}
1
likes
0
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight, reusable custom masonry grid for Flutter gallery without any external dependencies.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on custom_masonry_grid