Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

[ScrollablePositionedList] Positions of itemPositionsListener not return the correct values when use initialScrollIndex #551

@GustC

Description

@GustC

Problem description

When use the argument initialScrollIndex on ScrollablePositionedList, the values of itemPositionsListener not represent the correct values showed on scroll list. If the initialScrollIndex set on 0 the itemPositionsListener returns the correct values.

Steps to reproduce

  1. Create a ScrollablePositionedList with 100 elements;
  2. Adding listiner on itemPositionsListener to see the positions elements when scroll list;
  3. Set the initialScrollIndex if any value where index is not visible initialy on list. (example: 50);
  4. Scroll the list to index 0;

Demostration

Image

Expected behavior

  • The first element on positions need represents the first element showed on list.
  • The last element on positions need represents the last element showed on list.

Actual behavior

  • The first element on positions not represents the first element showed on list, in the Demostration the index of first element is 9 but the true index of first element showed on list is 0.
  • The last element on positions not represents the first element showed on list, in the Demostration the index of first element is 0 but the true index of last element showed on list is 9.

Environment

scrollable_positioned_list: ^0.3.8
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions