Hello, when i use kmp expect fun and put a modifie...
# compose-desktop
h
Hello, when i use kmp expect fun and put a modifier as default param, but it run with a NPE,Anyone know why?
m
having the same issue here😖
l
You can't have default parameters in expect/actual composable functions yet. The workaround is to create a function in common code with the default arguments that calls the expect function providing it all the parameters. See here for more info: https://github.com/JetBrains/compose-jb/issues/758
👍 1
o
shall work in
1.0.0-beta5
m
@olonho I tested with 1.0.0-beta5 also throws this error
Copy code
Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter modifier
l
I'm using
beta5
and still doesn't work for me on both desktop & android 🤔
Oh, you beat me by a second 😂
😂 2
o
cc @shikasd
@Oleksandr Karpovich [JB] maybe you got the idea?
o
No ideas at the moment unfortunately. I'll dig into this