Skip to content

Commit

Permalink
fix: invisibleItemsThreshold off-by-one
Browse files Browse the repository at this point in the history
  • Loading branch information
clragon committed Jan 28, 2025
1 parent 1edeae5 commit 262781a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/base/paged_layout_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class _PagedLayoutBuilderState<PageKeyType extends Object,
) {
if (!_hasRequestedNextPage) {
final newPageRequestTriggerIndex =
max(0, _itemCount - _invisibleItemsThreshold);
max(0, _itemCount - 1 - _invisibleItemsThreshold);

final isBuildingTriggerIndexItem = index == newPageRequestTriggerIndex;

Expand Down

0 comments on commit 262781a

Please sign in to comment.