android - 为什么我的 Flutter 应用的 ListView 滚动不如 Flutter

我使用 Flutter 创建了我的滚动演示应用的发布版本。我想知道为什么我的应用程序的 ListView 滚动不如 flutter 画廊应用程序流畅。我使用 LG G5 进行此测试。

这里是 a link to my app's demo

编辑: 这是代码。

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;
}

有人也有同样的经历吗?

谢谢!

最佳答案

Flutter 在“Debug”构建时并不那么流畅,在“Release”构建时运行得更流畅(从命令行运行“flutter run --release”)。当然,Iiro Krankka 的回答也会提升榜单的表现。

关于android - 为什么我的 Flutter 应用的 ListView 滚动不如 Flutter Gallery 应用流畅?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46761036/

相关文章:

android - 在 Scroll Flutter 上隐藏 Appbar?

flutter - 无状态和有状态小部件有什么区别?

dart - 每 x 秒 flutter 一次运行功能

flutter - 当 Flutter TextField 中的键盘可见时,键盘顶部有很多空白区域

dart - flutter 垂直视口(viewport)无界高度错误

flutter - 有没有更好的方法来检查#flutter 中的左/右拖动?

flutter - 小部件测试失败,未找到任何 MediaQuery 小部件

dart - Flutter - 翻牌效果

android - Flutter 中的 HTTP 请求

google-maps - Flutter中的谷歌地图没有响应触摸事件