How are people doing adaptive UI in a multiplatfor...
# multiplatform
m
How are people doing adaptive UI in a multiplatform way? I see this article which basically rolls their own
WindowSize
and saves it in a composition local. I know material3 has a premade enum but I think I also saw it wasn’t available on desktop. Please point me in the right direction if there are good resources for this somewhere already that I am missing. My google-fu is faint on the long weekend.
p
m
ah yes that is an option to I use it for something else too. it feels like there should be a more unified solution. let me play around a bit
p
I use
Modifier.onSizeChange{}
in my root composable. It gives you the actual size, keep in mind that BoxWithConstraint gives you the constraint not the actual composable size. Sometimes they match but sometimes they don’t.