Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jumpToItem() and animateToItem() don't work if center and anchor are set #59

Open
simc opened this issue May 25, 2024 · 2 comments
Open

Comments

@simc
Copy link

simc commented May 25, 2024

I have a CustomScrollView with two SuperSliverLists and they are centered in the CustomScrollView using the center and anchor properties. For both lists jumpToItem() and animateToItem() either don't work at all or jump to the wrong index.

CustomScrollView(
  controller: controller,
  center: centerKey,
  anchor: 0.5,
  cacheExtent: 2000,
  slivers: [
    SuperSliverList(
      listController: listController1,
      ...,
    ),
    SuperSliverList(
      key: centerKey,
      listController: listController2,
      ...,
    ),
  ],
),
@knopp
Copy link
Collaborator

knopp commented May 25, 2024

Mixing normal and reverse growth direction slivers in single scroll view is not supported. This seems pretty difficult to do since the slivers before affect the target scroll position. That said, if somebody submits a PR for this I'll be more than happy to review :)

@xsahil03x
Copy link

Hey @simc , have you found any alternative yet? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants