【发布时间】:2019-02-09 18:03:01
【问题描述】:
我有一个带有孩子的有状态小部件
final _scrollController = TrackingScrollController();
PageView(
controller: _pageController,
children: <Widget>[
_ListView(controller: _scrollController),
_ListView(controller: _scrollController),
_ListView(controller: _scrollController),
],
)
这似乎与此处显示的模式匹配 https://docs.flutter.io/flutter/widgets/TrackingScrollController-class.html
但是,当我滚动一个列表时,其他列表未同步,并且每一帧都会出现此错误
flutter: Another exception was thrown: ScrollController attached to multiple scroll views.
关于我做错了什么有什么想法吗?我对 TrackingScrollController 有不合理的期望吗?
【问题讨论】:
-
在示例中,一次只显示一个 ListView。他们在网页浏览中
标签: flutter