How to Synchronize ScrollController with ItemScrollController in Flutter? (SingleChildScrollView and ScrollablePositionedList.builder)

How can one synchronize the scrolling between a SingleChildScrollView and a ScrollablePositionedList.builder?

The SingleChildScrollView uses a ScrollController, while the ScrollablePositionedList.builder uses an ItemScrollController. The items in the ScrollablePositionedList.builder have varying heights.

What is the best approach to achieve synchronized scrolling between these two widgets?

Situation: there are two long screens: the first is SingleChildScrollView with a shimmer effect, and the second is a ScrollablePositionedList.builder. Scrolling one should scroll the other in sync. How can this be achieved?

Upvotes: 0

Views: 40

Answers (0)

Related Questions