我使用Flutter创建了我的滚动演示应用程序的发布版本.我想知道为什么我的应用程序的listview滚动不像flutter gallery应用程序那么流畅.我用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"),
) …Run Code Online (Sandbox Code Playgroud)