Repository navigation
v0.8.0-dev.3
Pre-releaseThird pre-release of 0.8.0, with three new options for the layouts. Please try it and report any issue before the stable 0.8.0.
dependencies:
flutter_staggered_grid_view: ^0.8.0-dev.3New
-
Full span children in masonry grids (#337): with
isFullSpan, some children of aMasonryGridViewor aSliverMasonryGridspan the whole width of the grid, like a banner or a section header. They start below all the columns, and the columns are aligned after them.MasonryGridView.count( crossAxisCount: 2, itemCount: items.length, isFullSpan: (index) => items[index] is Ad, itemBuilder: (context, index) => ..., );
-
Sparse placement of
StaggeredGrid(#284): withplacement: StaggeredGridPlacement.sparse, each tile is placed after the previous one, so the tiles appear in their order, instead of filling the holes left before previous tiles (the default,dense). -
alternateDirectionsonSliverStairedGridDelegate(#261, thanks to whynot-dev for #357): withfalse, all the tracks of a staired grid are placed in the same direction (a 'Z' sequence) instead of going back and forth.
The example app has an option for each of them, in the app bar of the Masonry, Staggered and Staired pages.
Fixes
- Children of a masonry grid could lose their state when a child moved with a key left a hole just before the visible children.
Changes
SliverMasonryGridParentData.crossAxisIndexis null for the children spanning the whole cross axis.
The package still supports Flutter 3.16 and later. See the CHANGELOG for the details.