Source set: Common
public interface PressGestureScope : Density
Receiver scope for detectTapGestures's onPress lambda. This offers two methods to allow waiting for the press to be released.
Functions
awaitRelease
Source set: Common
public 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.
tryAwaitRelease
Source set: Common
public 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.