Timo Drick
07/10/2023, 12:45 PM@Composable
fun CustomLayout(
    child1: @Composable () -> Unit = {},
    child2: @Composable () -> Unit = {},
) {
    val cfg = LocalConfiguration.current
    val isLandscape by remember(cfg) { derivedStateOf { cfg.orientation == Configuration.ORIENTATION_LANDSCAPE } }
    if (isLandscape) {
        Row() {
            child1()
            child2()
        }
    } else {
        Column() {
            child1()
            child2()
        }
    }
}Stylianos Gakis
07/10/2023, 12:53 PMTimo Drick
07/10/2023, 12:57 PM