Interface

FlexConfigScope

Scope for configuring flex item properties within a FlexBox.

FlexConfigScopeSample

@Sampled
@Composable
fun FlexConfigScopeSample() {

    FlexBox {
        Box(
            Modifier.flex {
                grow(1f) // Grow to fill space
                shrink(0f) // Don't shrink below basis
                basis(100.dp) // Start at 100dp
                alignSelf(FlexAlignSelf.Center) // Center this item
            }
        )
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: