Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Thanks! This looks like a bug, thank you for reporting!
na...@google.com <na...@google.com> #3
I would also recommend setting the value to 10%. When you do that, the behavior is wild.
Dragging up to 10% or between 50% and 90% will cause it to snap back to the start anchor.
Dragging between 10% and 50% or past 90% will cause it to snap to the end anchor.
Dragging up to 10% or between 50% and 90% will cause it to snap back to the start anchor.
Dragging between 10% and 50% or past 90% will cause it to snap to the end anchor.
Description
forEachGesture
is an extension ofPointerInputScope
and has a lambda also onPointerInputScope
. It repeats the lambda, which must callawaitPointerEventScope
inside it to find gestures. On each loop, it must enter and exitAwaitPointerEventScope
and each time it exits, there is a chance that events get lost between gestures.We need a new method that loops wholly within
AwaitPointerEventScope
so that events aren't lost.forEachGesture
can't be deprecated because there are use cases where suspend functions or acoroutineScope
belongs within the lambda block. But most gesture detectors don't need that.