letsar / flutter_staggered_grid_view

A Flutter staggered grid view
MIT License
3.14k stars 510 forks source link

Package does not working - solved #322

Open ergulecdemet opened 1 year ago

ergulecdemet commented 1 year ago

The package doesn not working but ı fina a way on StackOverFlow . Maybe it will work for someone ; CustomScrollView( slivers: [ SliverGrid( delegate: SliverChildBuilderDelegate( (context, index) => Container( color: Colors.cyanAccent, child: Image.network( "https://picsum.photos/seed/${index + 1}/200/300", fit: BoxFit.cover), ), childCount: 44, ), gridDelegate: SliverQuiltedGridDelegate( crossAxisCount: 3, mainAxisSpacing: 4, crossAxisSpacing: 4, repeatPattern: QuiltedGridRepeatPattern.inverted, pattern: const [ QuiltedGridTile(2, 2), //x(height):2, y(width):2 - 1.line 1.column QuiltedGridTile(2, 1), //x:2, y:1 - 1.line 2.column QuiltedGridTile(1, 1), //x:1, y:1 - 2.line 1.column QuiltedGridTile(1, 1), //x:1, y:1 - 2.line 2.column QuiltedGridTile(1, 1), //x:1, y:1 - 2.line 3.column ], )) ], ), image

https://stackoverflow.com/questions/67141139/staggered-grid-view-is-not-scrolling-upwards-in-flutter