-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item drag crashes only on web #14
Comments
Hi @jacobokoenig, I wonder if this might be related to #10. Could you try commenting out the onTap method in your GestureDetector to see if it still throws this exception? Does the exception happen on loading the widget or on starting to drag? |
Hi @philip-brink, seemingly unrelated as I removed the GestureDetector altogether but the problem remains the same. The exception happens on starting to drag. |
@philip-brink any ideas on this subject? I appreciate any guidance you can give me. |
I've tried reproducing it but without any luck. What's your Are the widgets inside the list ( Just to try to eliminate all potential issues, I've also added mounted checks to all the setState methods in the package in v 0.2.6 which you can try to see if it solves the problem. |
Thanks for your help @philip-brink. CategoryTitle, ProductDetailView are indeed Stateless as well. I've upgraded but no difference in the error. Here's my flutter doctor: [✓] Flutter (Channel dev, 1.24.0-1.0.pre, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 12.1) [✓] Chrome - develop for the web [✓] Android Studio (version 4.0) [✓] VS Code (version 1.50.1) [✓] Connected device (3 available) • No issues found! |
@philip-brink I found the issue. Inside of the tile itself, there was an InkWell with an onTap that navigates towards another view, hence dismounting the lists and causing the error. As it turns out changing the InkWell to a GestureDetector fixed the issue. Something different goes between them on the web where [I suppose] the InkWell calls onTap during the drag whilst GestureDetector doesn't. Thank you so much for your help. |
@jacobokoenig Great! That's good to know. Until this issue with dragging on flutter web gets resolved I'll add some info in the readme as a known problem. Thanks! |
@jacobokoenig This issue seems to be solved now on the flutter dev channel. |
Just faced the same issue, for all searching in their code for a solution: ListTile and therefore ExpansionTile is using InkWell - so it doesn't work with those widgets as well. |
Is it still the case? I'm considering using the package and ListTile is a standard component to use in a list so that would be no go to use the package. |
Hi,
I've implemented a list of lists which drags and drops effectively on mobile and tablet, but on web causes a weird and unusual crash. Here's the log of it:
And this is the list implementation:
Given all of the widgets surrounding the list are Stateless, it's even weirder. Any clues as to why this might be?
The text was updated successfully, but these errors were encountered: