Skip to content
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

Plugin breaks after some scrolling #1

Open
Prathik-Jain opened this issue Jul 11, 2019 · 4 comments
Open

Plugin breaks after some scrolling #1

Prathik-Jain opened this issue Jul 11, 2019 · 4 comments

Comments

@Prathik-Jain
Copy link

Hi @icemanbsi, thank you for making the plugin available.

While I was trying to implement it in one of our projects I get the following error:

I/flutter (22078): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter (22078): The following assertion was thrown while handling a gesture:
I/flutter (22078): 'package:flutter/src/widgets/scrollable.dart': Failed assertion: line 492 pos 12: '_hold == null':
I/flutter (22078): is not true.
I/flutter (22078):
I/flutter (22078): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (22078): more information in this error message to help you determine and fix the underlying cause.
I/flutter (22078): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (22078):   https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (22078):
I/flutter (22078): When the exception was thrown, this was the stack:
I/flutter (22078): #2      ScrollableState._handleDragStart 
package:flutter/…/widgets/scrollable.dart:492
I/flutter (22078): #3      DragGestureRecognizer._checkStart.<anonymous closure> 
package:flutter/…/gestures/monodrag.dart:364
I/flutter (22078): #4      GestureRecognizer.invokeCallback 
package:flutter/…/gestures/recognizer.dart:182
I/flutter (22078): #5      DragGestureRecognizer._checkStart 
package:flutter/…/gestures/monodrag.dart:364
I/flutter (22078): #6      DragGestureRecognizer.acceptGesture 
package:flutter/…/gestures/monodrag.dart:298
I/flutter (22078): #7      GestureArenaManager._resolveByDefault 
package:flutter/…/gestures/arena.dart:250
I/flutter (22078): #8      GestureArenaManager._tryToResolveArena.<anonymous closure> 
package:flutter/…/gestures/arena.dart:231
I/flutter (22078): (elided 12 frames from class _AssertionError and package dart:async)
I/flutter (22078):
I/flutter (22078): Handler: "onStart"
I/flutter (22078): Recognizer:
I/flutter (22078):   VerticalDragGestureRecognizer#e44da
I/flutter (22078): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (22078): Another exception was thrown: 'package:flutter/src/widgets/scrollable.dart': Failed assertion: line 497 pos 12: '_hold == null || _drag == null': is not true.
I/chatty  (22078): uid=10202(org.appiko.setup) Thread-2 identical 10 lines
I/flutter (22078): Another exception was thrown: 'package:flutter/src/widgets/scrollable.dart': Failed assertion: line 497 pos 12: '_hold == null || _drag == null': is not true.
I/flutter (22078): Another exception was thrown: 'package:flutter/src/widgets/scrollable.dart': Failed assertion: line 503 pos 12: '_hold == null || _drag == null': is not true.
TimePickerSpinner(
              highlightedTextStyle:
                  TextStyle(fontSize: 28, color: Theme.of(context).accentColor),
              normalTextStyle: TextStyle(fontSize: 24),
              is24HourMode: false,
              isForce2Digits: true,
              minutesInterval: 5,
              onTimeChange: (time) {},
            );

Am I missing something?

I found the same behavior on the example app.

@Prathik-Jain
Copy link
Author

Accidentally closed the issue.

@Prathik-Jain Prathik-Jain reopened this Jul 11, 2019
@AlaaEldeenYsr
Copy link

Any news about this issue ?

@Prathik-Jain
Copy link
Author

@AlaaEldeenYsr no, I am using the native CupertinoDateTimePicker now.

@icemanbsi
Copy link
Owner

Hi @Prathik-Jain and @AlaaEldeenYsr,
I'm sorry for a really late reply.
Your issue is not a new issue. I've struggling with that one a few months ago.
the cause is simple, the when the scrollable is still animating the smooth scroll, there is another new scroll event triggered from user. So I decided to wrap the scrollable inside a stack and place a new blank container on top of the scrollable. It works, but turned out you still have the problem.
after several test on my side, yes, sometimes the problem occurred. But if I place a color on the blocking container, the problem disappeared (I can't reproduce the bug while testing). So my fix is putting the transparent color on the blocking container (looks like there is a potential bug with blank container instead of colored one).
If you want to help me, please try again with the new update and let me know if the problem solved or still exists.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants