10

I updated my flutter and dart package last night and now StaggeredGridView which was scrolling perfectly before is giving me an error:

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: type 'SliverHitTestResult' is not a subtype of type 'BoxHitTestResult'
Munish Thakur
  • 926
  • 1
  • 8
  • 25

4 Answers4

8

i had the same problem , and i solved upgrading the version in pubspeck.yaml to flutter_staggered_grid_view 0.3.0

4

The BoxHitTestResult exception was fixed in new version of flutter_staggered_grid_view 0.3.0

You can check changelog here

If you have same issue after the upgrade,

run flutter clean in terminal and then run again.

Kavin-K
  • 1,948
  • 3
  • 17
  • 48
1

@Yamim comment: "switch your channel to stable" worked.

Here is the command you can use:

flutter channel stable

Other Channels:

$ flutter channel
Flutter channels:
  * stable
    beta
    dev
    master

For more information about channels you can refer: https://github.com/flutter/flutter/wiki/Flutter-build-release-channels

Munish Thakur
  • 926
  • 1
  • 8
  • 25
0

This issue is resolved in the upgraded package No need to modify the code just upgrade the package.

Add the following dependencies to your pubspec.yaml and restart the application. It works well.

flutter_staggered_grid_view: 0.3.0
Divyesh mehta
  • 446
  • 5
  • 10