Answers for "flutter detect when listview scrolling to top"

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
0

listview scroll direction flutter

ListView(
  // This next line does the trick.
  scrollDirection: Axis.horizontal,
  children: <Widget>[
    ....
  ],
)
Posted by: Guest on June-17-2021

Code answers related to "flutter detect when listview scrolling to top"

Code answers related to "Dart"

Browse Popular Code Answers by Language