Giter VIP home page Giter VIP logo

Comments (25)

sinuraya avatar sinuraya commented on May 18, 2024 40

here is work for me:

  1. uprgade flutter_staggered_grid_view to 0.3.0
  2. if the problem still persist, delete ~/.pub-cache/hosted/pub.dartlang.org folder
  3. run $ flutter pub get
  4. your flutter_staggered_grid_view should work by now

from flutter_staggered_grid_view.

letsar avatar letsar commented on May 18, 2024 16

Thanks, published in v0.3.0

from flutter_staggered_grid_view.

dereklakin avatar dereklakin commented on May 18, 2024 10

I've fixed it for my scenario, though I'm not sure if it will work for everyone. In sliver_variable_size_box_adaptor.dart change hitTestChildren method to:

  bool hitTestChildren(HitTestResult result,
      {@required double mainAxisPosition, @required double crossAxisPosition}) {
    for (var child in children) {
      if (hitTestBoxChild(BoxHitTestResult.wrap(result), child,
          mainAxisPosition: mainAxisPosition,
          crossAxisPosition: crossAxisPosition)) return true;
    }
    return false;
  }

The important bit is the change to call BoxHitTestResult.wrap(result) in the call to hitTestBoxChild instead of just passing result.

from flutter_staggered_grid_view.

nixoncode avatar nixoncode commented on May 18, 2024 5

After upgrade to 0.3.0 on Flutter 1.7.8. Running flutter clean works for me.

This worked for me

from flutter_staggered_grid_view.

xhidnoda avatar xhidnoda commented on May 18, 2024 3

After upgrade to 0.3.0 on Flutter 1.7.8. Running flutter clean works for me.

from flutter_staggered_grid_view.

gateshibill avatar gateshibill commented on May 18, 2024 3

update flutter_staggered_grid_view: ^0.3.0,it is ok!

from flutter_staggered_grid_view.

dereklakin avatar dereklakin commented on May 18, 2024 1

Same here using StaggeredGridView inside a NestedScrollView when trying to scroll.

from flutter_staggered_grid_view.

dereklakin avatar dereklakin commented on May 18, 2024 1

It's something to do with the hitTestChildren method in SliverVariableSizeBoxAdapter. If I revert it to just call super.hitTestChildren then scrolling works, but onTap on my child items never fires, so there's more to it than that :)

from flutter_staggered_grid_view.

mickykebe avatar mickykebe commented on May 18, 2024 1

This solution no longer works since flutter version 1.7.

from flutter_staggered_grid_view.

udit-wynk avatar udit-wynk commented on May 18, 2024 1

facing the same issue with Flutter 1.7.8+hotfix.3 and flutter_staggered_grid_view 0.3.0.
Please provide with a fix..

from flutter_staggered_grid_view.

sunderls avatar sunderls commented on May 18, 2024 1

above works!

from flutter_staggered_grid_view.

Theunodb avatar Theunodb commented on May 18, 2024

Also having this problem.

from flutter_staggered_grid_view.

jarekb123 avatar jarekb123 commented on May 18, 2024

Also having this issue.

from flutter_staggered_grid_view.

korbacsk avatar korbacsk commented on May 18, 2024

Same problem.

from flutter_staggered_grid_view.

jitenders859 avatar jitenders859 commented on May 18, 2024

same problem

from flutter_staggered_grid_view.

vishaakm avatar vishaakm commented on May 18, 2024

I've fixed it for my scenario, though I'm not sure if it will work for everyone. In sliver_variable_size_box_adaptor.dart change hitTestChildren method to:

  bool hitTestChildren(HitTestResult result,
      {@required double mainAxisPosition, @required double crossAxisPosition}) {
    for (var child in children) {
      if (hitTestBoxChild(BoxHitTestResult.wrap(result), child,
          mainAxisPosition: mainAxisPosition,
          crossAxisPosition: crossAxisPosition)) return true;
    }
    return false;
  }

The important bit is the change to call BoxHitTestResult.wrap(result) in the call to hitTestBoxChild instead of just passing result.

This Fixed the problem for me..

from flutter_staggered_grid_view.

cmcgill1988 avatar cmcgill1988 commented on May 18, 2024

Any news if the PR fixing this is going to get merged in? I'm keen to use this package but until this is fixed I will have to stick with my own implementation which isn't as clean or responsive as this package.

from flutter_staggered_grid_view.

Wood-Water-Peng avatar Wood-Water-Peng commented on May 18, 2024

It's really helpful,I have fixed this problem with overriding the hitTestChildren methodใ€‚
Thank you!
ps: StaggerGridView inside NestedScrollView

from flutter_staggered_grid_view.

rajesh-kc avatar rajesh-kc commented on May 18, 2024

Upgraded flutter to 1.7 v, Now flutter_staggered_grid_view package is throwing this error "Unhandled Exception: type 'SliverHitTestResult' is not a subtype of type 'BoxHitTestResult'"

Upgraded package to 0.3.0 from 0.2.7, The error remains the same.

Requesting the author to provide a solution.

from flutter_staggered_grid_view.

miguelangarano avatar miguelangarano commented on May 18, 2024

@dereklakin 's solution works like a charm for me in Flutter 1.7.8+hotfix.3 and last updated Staggered package

from flutter_staggered_grid_view.

 avatar commented on May 18, 2024

update flutter_staggered_grid_view: ^0.3.0,it is ok!

its is working, nice thankyou !

from flutter_staggered_grid_view.

dongzhixuanyuan avatar dongzhixuanyuan commented on May 18, 2024

After upgrade to 0.3.0. Running flutter clean works for me. must run flutter clean

from flutter_staggered_grid_view.

w4t3r-45 avatar w4t3r-45 commented on May 18, 2024

here is work for me:

  1. uprgade flutter_staggered_grid_view to 0.3.0
  2. if the problem still persist, delete ~/.pub-cache/hosted/pub.dartlang.org folder
  3. run $ flutter pub get
  4. your flutter_staggered_grid_view should work by now

thaaaaaaaaaaaaaank you so much maaan my head burned trying to fix it and now all is working i just updated it to 0.3.0 thaaaaaaaaaaank you maaaaan

from flutter_staggered_grid_view.

tibfox avatar tibfox commented on May 18, 2024

here is work for me:

1. uprgade flutter_staggered_grid_view to 0.3.0

2. if the problem still persist, delete ~/.pub-cache/hosted/pub.dartlang.org folder

3. run $ flutter pub get

4. your flutter_staggered_grid_view should work by now

thank you!

from flutter_staggered_grid_view.

GirijeshGupta avatar GirijeshGupta commented on May 18, 2024

Ya, it's work for me after upgrade 0.3.0

from flutter_staggered_grid_view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.