masonry_list_view_grid 1.0.1 copy "masonry_list_view_grid: ^1.0.1" to clipboard
masonry_list_view_grid: ^1.0.1 copied to clipboard

A new Flutter package that provides a masonry grid layout using list view.

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.

5
likes
140
pub points
73%
popularity

Publisher

unverified uploader

A new Flutter package that provides a masonry grid layout using list view.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, linked_scroll_controller

More

Packages that depend on masonry_list_view_grid