Skip to content

Commit

Permalink
Fixes #232
Browse files Browse the repository at this point in the history
  • Loading branch information
letsar committed Jul 10, 2022
1 parent fb35db2 commit 9c82ca2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.2
### Fixed
* Issue with Quilted layout algorithm. (https://github.com/letsar/flutter_staggered_grid_view/issues/232)

## 0.6.1
### Fixed
* Issue when childCount is 0 with Quilted layout.
Expand Down
2 changes: 2 additions & 0 deletions examples/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion lib/src/layouts/quilted.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class _SliverQuiltedGridLayout extends SliverGridLayout {
@override
int getMinChildIndexForScrollOffset(double scrollOffset) {
final mainAxisIndex = (scrollOffset ~/ mainAxisStride);
final a = (mainAxisIndex ~/ pattern.tileCount) * pattern.tileCount;
final a = (mainAxisIndex ~/ pattern.mainAxisCellCount) * pattern.tileCount;
final result = a + pattern.getMinTileIndexForMainAxisIndex(mainAxisIndex);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_staggered_grid_view
description: Provides a collection of Flutter grids layouts (staggered, masonry, quilted, woven, etc.).
version: 0.6.1
version: 0.6.2
homepage: https://github.com/letsar/flutter_staggered_grid_view

environment:
Expand Down

0 comments on commit 9c82ca2

Please sign in to comment.