Created
March 27, 2022 22:19
-
-
Save PhilipDukhov/53c66789f631a2ebd63656e7f972f343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
inline fun LtrRow( | |
modifier: Modifier = Modifier, | |
horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, | |
verticalAlignment: Alignment.Vertical = Alignment.Top, | |
crossinline content: @Composable RowScope.() -> Unit | |
) { | |
val direction = LocalLayoutDirection.current | |
CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Ltr) { | |
Row( | |
modifier = modifier, | |
horizontalArrangement = horizontalArrangement, | |
verticalAlignment = verticalAlignment, | |
) { | |
CompositionLocalProvider(LocalLayoutDirection provides direction) { | |
content() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This so smart !