Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable minWidth should be maxWidth #263

Open
totemtec opened this issue May 3, 2024 · 0 comments
Open

Variable minWidth should be maxWidth #263

totemtec opened this issue May 3, 2024 · 0 comments
Assignees

Comments

@totemtec
Copy link

totemtec commented May 3, 2024

File: com.example.compose.snippets.layouts.ConstraintLayoutSnippets.kt

fun DecoupledConstraintLayout() {
    BoxWithConstraints {
        val constraints = if (minWidth < 600.dp) {
            decoupledConstraints(margin = 16.dp) // Portrait constraints
        } else {
            decoupledConstraints(margin = 32.dp) // Landscape constraints
        }

Variable minWidth should be maxWidth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants