Does anyone know if/when compose multiplatform wil...
# multiplatform
d
Does anyone know if/when compose multiplatform will get better support for previews in
commonMain
when using Android studio? I’m not able to see previews and it’s making iterating a bit longer than I’d like
p
I believe commonMain previews are only planned for Fleet IDE. In Android Studio what you can do is wrapping your commonMain widgets in an Android preview and use Android preview support. Is the same or faster
c
1. this is a #compose question. 2. Fleet is the designated Compose Multiplatform Editor and has the required annotation processor. https://blog.jetbrains.com/kotlin/2024/02/compose-multiplatform-1-6-0-release/#preview-annotation-for-fleet
👍 1
d
@Pablichjenkov can you please give me more details around
wrapping your commonMain widgets in an Android preview
p
In
androidMain
create a Composable that just calls your Composable in
commonMain
. Actually, technically speaking is not a wrapper in terms of software but an
encapsulating
function. I think they do this in project Appyx, they have an android-only separate module just for Previews
d
Also font loading from commonMain in androidMain previews breaks even when wrapping the previews with android previews
✔️ 1