Compose Modifier

onIndirectPointerGesture

A Modifier that detects high-level click and horizontal swipe gestures from an IndirectPointerEvent source.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

OnIndirectPointerGestureSample

@Composable
fun OnIndirectPointerGestureSample() {
    Box(
        modifier =
            Modifier.fillMaxSize()
                .onIndirectPointerGesture(
                    enabled = true,
                    onSwipeForward = { /* onSwipeForward */ },
                    onSwipeBackward = { /* onSwipeBackward */ },
                    onClick = { /* onClick */ },
                )
                .focusTarget()
    ) {
        // App()
    }
}