Answers for "how to scroll to a position in flutter listview"

1

how to scroll to a position in flutter listview

ItemScrollController _scrollController = ItemScrollController();

ScrollablePositionedList.builder(
  itemScrollController: _scrollController,
  itemCount: _myList.length,
  itemBuilder: (context, index) {
    return _myList[index];
  },
)

_scrollController.scrollTo(index: 150, duration: Duration(seconds: 1));
Posted by: Guest on August-01-2020

Code answers related to "how to scroll to a position in flutter listview"

Browse Popular Code Answers by Language