Scope for the content of a [FlexBox].
FlexBoxScopeSample
@OptIn(ExperimentalFlexBoxApi::class)
@Composable
fun FlexBoxScopeSample() {
// FlexConfig can be defined as top-level constants for reuse
val NoShrink = FlexConfig { shrink(0f) }
FlexBox {
// Basic item without flex configuration
Box(Modifier.size(50.dp).background(Color.Red))
// Item with inline flex configuration
Box(Modifier.size(50.dp).background(Color.Green).flex { grow(1f) })
// Item with reusable FlexConfig
Box(Modifier.size(50.dp).background(Color.Blue).flex(NoShrink))
}
}