【问题标题】:StaggeredGridView not scrolling after updating Flutter更新 Flutter 后 StaggeredGridView 不滚动
【发布时间】:2019-09-29 15:07:30
【问题描述】:

我昨晚更新了我的颤振和飞镖包,现在之前完美滚动的 StaggeredGridView 给了我一个错误:

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'SliverHitTestResult' is not a subtype of type 'BoxHitTestResult'

【问题讨论】:

标签: flutter dart flutter-layout flutter-widget flutter-gridview


【解决方案1】:

我遇到了同样的问题,我解决了将 pubspeck.yaml 中的版本升级到 flutter_staggered_grid_view 0.3.0

【讨论】:

  • 这就是解决方案
【解决方案2】:

在新版本的flutter_staggered_grid_view 0.3.0

中修复了BoxHitTestResult异常

你可以在这里查看changelog

如果升级后遇到同样的问题,

在终端中运行flutter clean,然后再次运行。

【讨论】:

    【解决方案3】:

    @Yamim 评论:“将您的频道切换到稳定版”有效。

    这是你可以使用的命令:

    flutter channel stable
    

    其他渠道:

    $ flutter channel
    Flutter channels:
      * stable
        beta
        dev
        master
    

    有关频道的更多信息,您可以参考: https://github.com/flutter/flutter/wiki/Flutter-build-release-channels

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-13
      • 1970-01-01
      • 2021-11-15
      • 2012-09-06
      • 2019-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多