staggered_grid_view
0.0.1, released 2 years ago by akbon.dev
A flexible Flutter package for creating staggered grid layouts with variable-sized items.
What it does
The staggered_grid_view package allows developers to build staggered grid layouts where items can span multiple rows and columns. It provides various constructors for fixed, extent-based, and dynamically built grids with lazy loading capabilities.
AI-written summary of version 0.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display items of varying sizes in a grid layout similar to Pinterest.
- You want a familiar GridView-like API with custom staggered tile sizing.
Skip it when
- You only require standard uniform grid cells where every item has the exact same dimensions.
Strengths
- Supports both fixed and dynamic extents for items.
- Offers lazy loading and automatic keep-alives for performance.
- Familiar API mirroring Flutter's built-in GridView.
Weaknesses
- Limited documentation or features beyond the open beta release.
- Not mentioned if advanced custom layout delegates can be written from scratch easily outside the provided Sliver delegates.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
StaggeredGridView.count(
crossAxisCount: 4,
staggeredTiles: const [
StaggeredTile.count(2, 2),
StaggeredTile.count(1, 2),
],
children: List.generate(2, (index) => Card(child: Text('Item $index'))),
)Alternatives
Packages that do the same job and could replace staggered_grid_view.
- flutter_staggered_grid_view
It is an established package in the catalog providing similar staggered grid view capabilities.
50Compare
Works with
Packages commonly used together with staggered_grid_view: ones it builds on, ones built on it, and its own family.