【发布时间】:2018-03-27 10:14:51
【问题描述】:
我使用 Flutter 创建了我的滚动演示应用的发布版本。我想知道为什么我的应用程序的列表视图滚动不如颤振画廊应用程序流畅。我使用 LG G5 进行此测试。
编辑: 这是代码。
class ListViewSample extends StatelessWidget {
@override
Widget build(BuildContext buidContext) {
return new Container(
child: new Center(
child: new ListView(
children: createListTiles(),
),
)
);
}
List<Widget> createListTiles() {
List<Widget> tiles = <Widget>[];
for(int i = 0; i < 40; i++) {
int count = i + 1;
tiles.add(
new ListTile(
leading: new CircleAvatar(
child: new Text("$count"),
backgroundColor: Colors.lightGreen[700],
),
title: new Text("Title number $count"),
subtitle: new Text("This is the subtitle number $count"),
)
);
}
return tiles;
}
有人也有同样的经历吗?
谢谢!
【问题讨论】:
-
你是如何实现你的 ListView 的?你能分享一些代码吗?
-
你试过释放模式了吗?
标签: android listview scroll dart flutter