https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
p

Pablichjenkov

03/03/2023, 1:59 AM
Is
Modifier.pointerInteropFilter()
implemented yet? No luck importing it.
e

ephemient

03/03/2023, 3:46 AM
it exposes Android's MotionEvent, how would that work on other platforms?
p

Pablichjenkov

03/03/2023, 5:18 AM
humm I see, I didn’t notice that. Well that was my last resource to tackle this: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1677561456829879 I have tried a couple of ways but no luck. I guess I gotta keep digging into code/documentation
My goal is to make a predictive back kind of functionality in a composable so it could be available in iOS too. It is working ok but when I place the predictive-back composable within a Pager or Drawer it always steal the first fling. By the time I remove the pointerInput it is too late.
l

Landry Norris

03/04/2023, 4:08 PM
If you can find an equivalent on other platforms, like with nativeCanvas, you can expect/actual a modifier extension. I did this with nativeCanvas in the past for low-level control in shared code.
p

Pablichjenkov

03/04/2023, 8:54 PM
honestly I am not sure if the .pointerInteropFilter() would help to fix my problem. I just wanted to give it a try. For now I am thinking of asking if there is a Pager in the composable hierarchy and remove the functionality. But not sure if that is feasible in compose.
67 Views