https://kotlinlang.org logo
#compose
Title
# compose
r

Rafs

10/21/2023, 1:29 PM
is there no
BackHandler
composable in compose multiplatform?
j

jamshedalamqaderi

10/21/2023, 1:29 PM
yep.
use
BackHandler{}
r

Rafs

10/21/2023, 1:30 PM
Can't find it.
j

jamshedalamqaderi

10/21/2023, 1:32 PM
oh. It's from navigation library. So, if you're using
precompose
then you'll get it
r

Rafs

10/21/2023, 1:33 PM
I can see that
BackHandler
is located in
androidx.activity
so that explains it.
👍 1
z

Zach Klippenstein (he/him) [MOD]

10/23/2023, 3:25 AM
“Back” as a generic event is an Android-specific concept, it wouldn’t make sense in multiplatform
👍 1
8 Views