📌  相关文章
📜  如何滚动到颤振列表视图中的某个位置 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:06.536000             🧑  作者: Mango

代码示例1
ItemScrollController _scrollController = ItemScrollController();

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

_scrollController.scrollTo(index: 150, duration: Duration(seconds: 1));