mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-23 23:44:44 +01:00
Workaround upstream grid scrolling bug when there are multiple sliver grids
This commit is contained in:
parent
85a9157a9d
commit
f8882de9d7
1 changed files with 51 additions and 42 deletions
|
@ -396,7 +396,15 @@ class _ButtonGrid extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SliverStaggeredGrid.extent(
|
||||
// needed to workaround a scrolling bug when there are more than one
|
||||
// SliverStaggeredGrids in a CustomScrollView
|
||||
// see: https://github.com/letsar/flutter_staggered_grid_view/issues/98 and
|
||||
// https://github.com/letsar/flutter_staggered_grid_view/issues/265
|
||||
return SliverToBoxAdapter(
|
||||
child: StaggeredGridView.extent(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
padding: const EdgeInsets.all(0),
|
||||
maxCrossAxisExtent: 256,
|
||||
staggeredTiles: List.filled(5, const StaggeredTile.fit(1)),
|
||||
children: [
|
||||
|
@ -443,6 +451,7 @@ class _ButtonGrid extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue