Skip to content

Commit

Permalink
fix issue when childCount is 0 for quilted layout
Browse files Browse the repository at this point in the history
  • Loading branch information
letsar committed Jan 26, 2022
1 parent 31ed723 commit 1fc0e2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/layouts/quilted.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ class _SliverQuiltedGridLayout extends SliverGridLayout {
// First we compute the number cells occupied in the main axis by the filled
// patterns.

if (childCount == 0) {
return 0;
}

final mainAxisCellCountBeforeLastPattern =
(childCount ~/ pattern.tileCount) * pattern.mainAxisCellCount;

Expand Down

0 comments on commit 1fc0e2e

Please sign in to comment.