双列网格原来是两个 Column 一次性建出所有卡片,翻几页后上百张卡连同封面都留在树上; 现在改成按行的 SliverList,只构建可见行,剧场页/新片页/搜索结果的滚动容器一并换成 sliver。 搜索结果、加载失败等状态同步改成 sliver,滚动位置与下拉刷新行为保持不变。
This commit is contained in:
1 parent
4aaa5bbd60
commit
fe49527dd8
6 files changed
+193
-145
No files matched your search
@@ -384,7 +384,7 @@ void main() {
|
||||
|
||||
expect(refresh.edgeOffset, 52);
|
||||
expect(
|
||||
tester.widget<ListView>(_verticalFeed).physics,
|
||||
tester.widget<CustomScrollView>(_verticalFeed).physics,
|
||||
AppPullToRefresh.physics,
|
||||
);
|
||||
await tester.drag(_verticalFeed, const Offset(0, 240));
|
||||
@@ -396,7 +396,8 @@ void main() {
|
||||
}
|
||||
|
||||
final Finder _verticalFeed = find.byWidgetPredicate(
|
||||
(widget) => widget is ListView && widget.scrollDirection == Axis.vertical,
|
||||
(widget) =>
|
||||
widget is CustomScrollView && widget.scrollDirection == Axis.vertical,
|
||||
);
|
||||
|
||||
Future<void> _pumpTheater(
|
||||
|
||||
Reference in new issue
Block a user