Two synchronized lists

how can two lists be synchronized, one full (vertical), another grouped by a specific field of the first (horizontal)
It is necessary that when scrolling the upper groups (horizontal scroll), the vertical one also scrolls to the position where the next group begins and vice versa.

use gridview maybe it will help u.

Hey, I can’t really get what is that you are trying to do. If you could add some screenshots and a deeper explanation that would go a long way.

But right now only thing I can think of is given each scroll a ScrollController, adding them to a class with ChangeNotifer and with Provider or another package like it, listen to changes in the scroll. :wink:

1 Like


Ok I understand now. I think this is your solution: Scroll_position_list
It is a package developed by google that creates like a regular ListView but with a controller that allows you to scroll to an item, not a position, and a Listener that allows you to keep track of what is been shown in the screen.

  final ItemScrollController _itemScrollController = ItemScrollController();
  final ItemPositionsListener _itemPositionsListener = ItemPositionsListener.create();

      itemScrollController: _itemScrollController,
      itemPositionsListener: _itemPositionsListener,

with the _itemScrollController you can call jumpTo(index) / scrollTo(index) instead of specifying a double. So you could ask the controller to JumpTo() a Title of one of the lists when the user tap's on the horizontal top menu.

With the Listener _itemPositionsListener you can keep track of what is visible, and when a certain element or index is shown, you change the horizontal top list to the next.

Hope I’ve made my self clear enough. Let me know if it works :wink:

1 Like

ok. Thanks ) I’ll send gif, if i succeed

1 Like

My example

if not open

My example gif

1 Like

Wuohhh!!! Nice!!! Looks super cool!! :wink:

Could you share source code?