A New Flutter Package That Provides A Masonry Grid Layout

Features

Provides a masonry grid layout using list view.

Usage

const children = [
    'child 1',
    'child 2',
    'child 3',
    'child 4',
    'child 5',
    'child 6',
    'child 7',
    'child 8',
    'child 9',
    'child 10',
];

MasonryGrid(
    column: 2,
    padding: EdgeInsets.all(8.0),
    children: List.generate(
        children.length,
        (index) => Container(
            child: Text(children[index]),
        ),
    ),
) 

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add masonry_list_view_grid

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  masonry_list_view_grid: ^0.0.4

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:masonry_list_view_grid/masonry_list_view_grid.dart'; 

Download details:

Author: Venubalan-T

Source: https://github.com/Venubalan-T/masonary_list_view_grid

#flutter #grid #view

A New Flutter Package That Provides A Masonry Grid Layout
1.40 GEEK