dart - 当您一直滚动到 ListView.builder 的顶部时,如何禁用动画

标签 dart flutter flutter-animation

我正在尝试在我的 flutter 应用程序中列出一个列表。但是,每次我一直滚动到顶部时,都会出现这样的动画:

/image/Z7mHh.jpg , /image/EAIyj.jpg

有没有办法隐藏这个动画?

最佳答案

NotificationListener<OverscrollIndicatorNotification>(
    onNotification: (OverscrollIndicatorNotification overscroll) {
      overscroll.disallowGlow();
    },
    child: ListView.builder(...));

作为official docs

GlowingOverscrollIndicator generates OverscrollIndicatorNotification before showing an overscroll indication. To prevent the indicator from showing the indication, call OverscrollIndicatorNotification.disallowGlow on the notification.

关于dart - 当您一直滚动到 ListView.builder 的顶部时,如何禁用动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53153219/

相关文章:

flutter - Shift + Tab和箭头(也为D-PAD)键不适用于TextFormField的焦点遍历

flutter - 刷新后将singlechildscroll View 移回顶部位置

dart - 忽略小部件的自定义宽度/高度属性

ios - 我可以在没有 Apple 开发者帐户的情况下使用 TestFairy 共享 iOS 调试应用程序吗?

flutter - 是否可以在 flutter 中更改 showGeneralDialog() 的默认动画?

flutter - 在灵活空间中使用重叠内容滚动应用栏

dart - 在 Dart 单元测试中访问 DOM

dart - 为什么颜色没有变化?

dart - 管理 PaginatedDataTable 的 DataTableSource 的最佳方式?

flutter - Flutter:WAITINGHTTP请求进入循环