滚动时颤振的listview项消失

时间:2020-04-28 02:15:24

标签: listview flutter

我在Listview中放入了许多Listile小部件,在物理IOS设备上调试了该应用程序,当我快速向上滚动listview时,它几乎到达了listview的顶部,列表项突然消失了,正文区域为空,有人知道如何解决该问题吗?预先感谢。

代码:

    return Scrollbar(
      child:ListView.builder(
        key: const PageStorageKey("list1"),
        cacheExtent: 999999,
        itemCount: _peddingContacts.length,
        padding: const EdgeInsets.all(8),
        itemBuilder: (BuildContext context,int index){
            if(index.isOdd){
              return Divider();
            }
            final idx = index ~/ 2;
            return _buildRow(_peddingContacts.elementAt(idx), 0, idx);
        })
      );
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[!] Android Studio (version 3.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.2)
[✓] Proxy Configuration
[✓] Connected device (2 available)

! Doctor found issues in 2 categories.

0 个答案:

没有答案