如何滚动到列表视图中的特殊小部件?例如,如果我按下特定按钮,我想自动滚动到ListView中的某个Container.
ListView(children: <Widget>[
Container(...),
Container(...), #scroll for example to this container
Container(...)
]);
Run Code Online (Sandbox Code Playgroud) 我有一个列表视图。我想通过相应的索引号转到某个小部件。
我已经尝试过使用 ScrollController,但它需要偏移值来跳转到索引。但我想使用它的索引号跳转到一个小部件。
请帮我修复它提前谢谢。