Last updated:
0 purchases
masonry list view grid
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.
Getting started #
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
masonry_list_view_grid: <latest_version>
copied to clipboard
In your library add the following import:
import 'package:masonry_list_view_grid/masonry_list_view_grid.dart';
copied to clipboard
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}'),
),
),
),
),
copied to clipboard
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.