Pub

masonry_list_view_grid

Provides a masonry grid layout using list view.

Layout handles large number of children, since it uses list view like dynamic rendering.

masonry_list_view_grid (3)

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  masonry_list_view_grid: <latest_version>

In your library add the following import:

import 'package:masonry_list_view_grid/masonry_list_view_grid.dart';

For help getting started with Flutter, view the online documentation.

Usage

MasonryListViewGrid(
    column: 2,
    padding: const EdgeInsets.all(8.0),
    children: List.generate(
        100,
        (index) => Container(
            decoration: BoxDecoration(
                color: Color((Random().nextDouble() * 0xFFFFFF).toInt())
                    .withOpacity(0.5),
            ),
            height: (150 + (index % 3 == 0 ? 50 : 0)).toDouble(),
            child: Center(
                    child: Text('Child ${index + 1}'),
            ),
        ),
    ),
),

Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.