PressGestureScope
Interface
Common
@JvmDefaultWithCompatibility
interface PressGestureScope : Density
Receiver scope for detectTapGestures's onPress lambda. This offers two methods to allow
waiting for the press to be released.
Functions
suspend fun awaitRelease()
Waits for the press to be released before returning. If the gesture was canceled by motion
being consumed by another gesture, GestureCancellationException will be thrown.
suspend fun tryAwaitRelease(): Boolean
Waits for the press to be released before returning. If the press was released, true is
returned, or if the gesture was canceled by motion being consumed by another gesture, false
is returned.
