Home > Net >  How to make a ListView move horizontally right or left
How to make a ListView move horizontally right or left

Time:07-16

As you can see in the attached picture I have a ListView that contains “Baby World, Beverages, Water, Dairy & Deli…& more” I can scroll it horizontally. Below I have the same ListView and each Category has many items.

My question is:

How can I make the first ListView move horizontally right or left depending on which Category I reach when I am scrolling down.

Screenshot

CodePudding user response:

You could try to use a combination of https://pub.dev/packages/inview_notifier_list to check which section is in view and https://pub.dev/packages/scroll_to_index to scroll the first listview accordingly.

CodePudding user response:

Just add this attribute to the

ListView.builder(
scrollDirection: Axis.horizontal,
)
  • Related