Introduce receiver scope for WithConstraints
This allows to simplify the usage as you will not need to write something like:
WithConstraints { constraints, _ -> }
When you need constraints, but not layout direction.
Plus allows us to provide additional helper properties minWidth, maxWidth, minHeight and maxHeight which are values in Dp instead of pixels. This simplifies the main usecase of the WithConstraints were you need to check if the available size in dp is within the threshold you have in Dp.
Relnote: WithConstraints trailing lambda API has been changed. Now instead of two params it has a receiver scope which in addition to constraints and layoutDirection provides minWidth, maxWidth, minHeight and maxHeight properties in Dp
Fixes: 149979702
Test: new tests
Change-Id: I91b9af740cd2613ddd4fe6d63cd539a46b52fc52
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/HotReloadIntegrationTests.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/HotReloadIntegrationTests.kt
index e4fd951..7b9bb1f 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/HotReloadIntegrationTests.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/HotReloadIntegrationTests.kt
@@ -55,7 +55,7 @@
activity.uiThread {
activity.setContent {
Column {
- WithConstraints { _, _ ->
+ WithConstraints {
val state = state { DrawerState.Closed }
ModalDrawerLayout(
drawerState = state.value,
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
index d7a0743..75e33a5 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
@@ -53,7 +53,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints { constraints, _ ->
+ WithConstraints {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -123,7 +123,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -171,7 +171,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -268,7 +268,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -371,7 +371,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -459,7 +459,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -570,7 +570,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -636,7 +636,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -715,7 +715,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -762,7 +762,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -817,7 +817,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -855,7 +855,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -892,7 +892,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -955,7 +955,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -994,7 +994,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1039,7 +1039,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1098,7 +1098,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1168,7 +1168,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1222,7 +1222,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1279,7 +1279,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1330,7 +1330,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1363,7 +1363,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1415,7 +1415,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1498,7 +1498,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1551,7 +1551,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1598,7 +1598,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1659,7 +1659,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1698,7 +1698,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1748,7 +1748,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1791,7 +1791,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1838,7 +1838,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1886,7 +1886,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1927,7 +1927,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -1966,7 +1966,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2021,7 +2021,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2066,7 +2066,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2105,7 +2105,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2157,7 +2157,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2257,7 +2257,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2308,7 +2308,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2367,7 +2367,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2414,7 +2414,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2486,7 +2486,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2544,7 +2544,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2610,7 +2610,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2696,7 +2696,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2743,7 +2743,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2784,7 +2784,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2823,7 +2823,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2862,7 +2862,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2923,7 +2923,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -2962,7 +2962,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3001,7 +3001,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3039,7 +3039,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3069,7 +3069,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3144,7 +3144,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3199,7 +3199,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3260,7 +3260,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3293,7 +3293,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3350,7 +3350,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3388,7 +3388,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3424,7 +3424,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3461,7 +3461,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3522,7 +3522,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3561,7 +3561,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3605,7 +3605,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3648,7 +3648,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3699,7 +3699,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3749,7 +3749,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3814,7 +3814,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3878,7 +3878,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -3949,7 +3949,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4018,7 +4018,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4065,7 +4065,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4111,7 +4111,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4150,7 +4150,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4201,7 +4201,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4308,7 +4308,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4360,7 +4360,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4417,7 +4417,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4457,7 +4457,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4537,7 +4537,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4608,7 +4608,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4663,7 +4663,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4706,7 +4706,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4739,7 +4739,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4797,7 +4797,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4853,7 +4853,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4890,7 +4890,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4937,7 +4937,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -4981,7 +4981,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5018,7 +5018,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5058,7 +5058,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5116,7 +5116,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5189,7 +5189,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5242,7 +5242,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5287,7 +5287,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5348,7 +5348,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5414,7 +5414,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5467,7 +5467,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5512,7 +5512,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5577,7 +5577,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5640,7 +5640,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5678,7 +5678,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5721,7 +5721,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5760,7 +5760,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5816,7 +5816,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5861,7 +5861,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5900,7 +5900,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5933,7 +5933,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -5984,7 +5984,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6027,7 +6027,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6060,7 +6060,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6119,7 +6119,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6190,7 +6190,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6241,7 +6241,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6280,7 +6280,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6327,7 +6327,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6366,7 +6366,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6405,7 +6405,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6448,7 +6448,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6493,7 +6493,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6548,7 +6548,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6593,7 +6593,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6638,7 +6638,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6685,7 +6685,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6724,7 +6724,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6757,7 +6757,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6802,7 +6802,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6841,7 +6841,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6874,7 +6874,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6921,7 +6921,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -6997,7 +6997,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7132,7 +7132,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7190,7 +7190,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7253,7 +7253,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7300,7 +7300,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7367,7 +7367,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7400,7 +7400,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7434,7 +7434,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7495,7 +7495,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7572,7 +7572,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7635,7 +7635,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7727,7 +7727,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7824,7 +7824,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7889,7 +7889,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -7972,7 +7972,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -8055,7 +8055,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -8093,7 +8093,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
@@ -8160,7 +8160,7 @@
emptyList<Collection<KCallable<*>>>()
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
Box(Modifier.padding(1.dp) + DrawBackground(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
diff --git a/ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/core/WithConstraintsBenchmark.kt b/ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/core/WithConstraintsBenchmark.kt
index c91510e..011792c 100644
--- a/ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/core/WithConstraintsBenchmark.kt
+++ b/ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/core/WithConstraintsBenchmark.kt
@@ -89,7 +89,7 @@
override fun emitContent() {
val size = state { 200.dp }
this.state = size
- WithConstraints { _, _ ->
+ WithConstraints {
Box(Modifier.preferredSize(300.dp), gravity = ContentGravity.Center) {
Spacer(Modifier.preferredSize(width = size.value, height = size.value))
}
@@ -110,7 +110,7 @@
val size = state { 100.ipx }
this.state = size
ChangingConstraintsLayout(state) {
- WithConstraints { _, _ ->
+ WithConstraints {
Box(Modifier.fillMaxSize())
}
}
diff --git a/ui/ui-core/api/0.1.0-dev11.txt b/ui/ui-core/api/0.1.0-dev11.txt
index 13ebdf1..f88a992 100644
--- a/ui/ui-core/api/0.1.0-dev11.txt
+++ b/ui/ui-core/api/0.1.0-dev11.txt
@@ -437,7 +437,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -910,6 +910,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/api/current.txt b/ui/ui-core/api/current.txt
index 13ebdf1..f88a992 100644
--- a/ui/ui-core/api/current.txt
+++ b/ui/ui-core/api/current.txt
@@ -437,7 +437,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -910,6 +910,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/api/public_plus_experimental_0.1.0-dev11.txt b/ui/ui-core/api/public_plus_experimental_0.1.0-dev11.txt
index 69a9b7a..e8a7553 100644
--- a/ui/ui-core/api/public_plus_experimental_0.1.0-dev11.txt
+++ b/ui/ui-core/api/public_plus_experimental_0.1.0-dev11.txt
@@ -438,7 +438,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -912,6 +912,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/api/public_plus_experimental_current.txt b/ui/ui-core/api/public_plus_experimental_current.txt
index 69a9b7a..e8a7553 100644
--- a/ui/ui-core/api/public_plus_experimental_current.txt
+++ b/ui/ui-core/api/public_plus_experimental_current.txt
@@ -438,7 +438,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -912,6 +912,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/api/restricted_0.1.0-dev11.txt b/ui/ui-core/api/restricted_0.1.0-dev11.txt
index 4668f8a..a74ec03 100644
--- a/ui/ui-core/api/restricted_0.1.0-dev11.txt
+++ b/ui/ui-core/api/restricted_0.1.0-dev11.txt
@@ -444,7 +444,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -920,6 +920,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/api/restricted_current.txt b/ui/ui-core/api/restricted_current.txt
index 4668f8a..a74ec03 100644
--- a/ui/ui-core/api/restricted_current.txt
+++ b/ui/ui-core/api/restricted_current.txt
@@ -444,7 +444,7 @@
method public static androidx.ui.core.LayoutNode.MeasureBlocks MeasuringIntrinsicsMeasureBlocks(kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void MultiMeasureLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children, kotlin.jvm.functions.Function4<? super androidx.ui.core.MeasureScope,? super java.util.List<? extends androidx.ui.core.Measurable>,? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,? extends androidx.ui.core.MeasureScope.MeasureResult> measureBlock);
method @Deprecated public static void PassThroughLayout(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function0<kotlin.Unit> children);
- method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function2<? super androidx.ui.core.Constraints,? super androidx.ui.core.LayoutDirection,kotlin.Unit> children);
+ method public static void WithConstraints(androidx.ui.core.Modifier modifier = Modifier, kotlin.jvm.functions.Function1<? super androidx.ui.core.WithConstraintsScope,kotlin.Unit> children);
}
public interface LayoutModifier extends androidx.ui.core.Modifier.Element {
@@ -920,6 +920,21 @@
ctor public VerticalAlignmentLine(kotlin.jvm.functions.Function2<? super androidx.ui.unit.IntPx,? super androidx.ui.unit.IntPx,androidx.ui.unit.IntPx> merger);
}
+ public interface WithConstraintsScope {
+ method public androidx.ui.core.Constraints getConstraints();
+ method public androidx.ui.core.LayoutDirection getLayoutDirection();
+ method public float getMaxHeight();
+ method public float getMaxWidth();
+ method public float getMinHeight();
+ method public float getMinWidth();
+ property public abstract androidx.ui.core.Constraints constraints;
+ property public abstract androidx.ui.core.LayoutDirection layoutDirection;
+ property public abstract float maxHeight;
+ property public abstract float maxWidth;
+ property public abstract float minHeight;
+ property public abstract float minWidth;
+ }
+
public final class WrapperKt {
method public static androidx.compose.ProvidableAmbient<androidx.animation.AnimationClockObservable> getAnimationClockAmbient();
method public static androidx.compose.ProvidableAmbient<androidx.ui.autofill.Autofill> getAutofillAmbient();
diff --git a/ui/ui-core/samples/src/main/java/androidx/ui/framework/samples/WithConstraintsSample.kt b/ui/ui-core/samples/src/main/java/androidx/ui/framework/samples/WithConstraintsSample.kt
index 9b2b339..d982003 100644
--- a/ui/ui-core/samples/src/main/java/androidx/ui/framework/samples/WithConstraintsSample.kt
+++ b/ui/ui-core/samples/src/main/java/androidx/ui/framework/samples/WithConstraintsSample.kt
@@ -30,10 +30,9 @@
@Sampled
@Composable
fun WithConstraintsSample() {
- WithConstraints { constraints, _ ->
+ WithConstraints {
val rectangleHeight = 100.dp
- val threshold = with(DensityAmbient.current) { (rectangleHeight * 2).toIntPx() }
- if (constraints.maxHeight < threshold) {
+ if (maxHeight < rectangleHeight * 2) {
Box(Modifier.preferredSize(50.dp, rectangleHeight), backgroundColor = Color.Blue)
} else {
Column {
diff --git a/ui/ui-core/src/androidTest/java/androidx/ui/core/test/WithConstraintsTest.kt b/ui/ui-core/src/androidTest/java/androidx/ui/core/test/WithConstraintsTest.kt
index 441c27a..5b88e0f 100644
--- a/ui/ui-core/src/androidTest/java/androidx/ui/core/test/WithConstraintsTest.kt
+++ b/ui/ui-core/src/androidTest/java/androidx/ui/core/test/WithConstraintsTest.kt
@@ -33,6 +33,7 @@
import androidx.test.filters.SmallTest
import androidx.test.rule.ActivityTestRule
import androidx.ui.core.Constraints
+import androidx.ui.core.DensityAmbient
import androidx.ui.core.Layout
import androidx.ui.core.LayoutDirection
import androidx.ui.core.LayoutModifier
@@ -50,9 +51,12 @@
import androidx.ui.graphics.Color
import androidx.ui.graphics.Paint
import androidx.ui.graphics.vector.VectorPainter
+import androidx.ui.layout.Constraints
+import androidx.ui.layout.DpConstraints
import androidx.ui.layout.ltr
import androidx.ui.layout.rtl
import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
import androidx.ui.unit.IntPx
import androidx.ui.unit.IntPxSize
import androidx.ui.unit.PxPosition
@@ -101,13 +105,13 @@
val secondChildConstraints = Ref<Constraints>()
rule.runOnUiThreadIR {
activity.setContent {
- WithConstraints { constraints, _ ->
+ WithConstraints {
topConstraints.value = constraints
Padding(size = size) {
val drawModifier = Modifier.drawBehind {
countDownLatch.countDown()
}
- WithConstraints(drawModifier) { constraints, _ ->
+ WithConstraints(drawModifier) {
paddedConstraints.value = constraints
Layout(measureBlock = { _, childConstraints, _ ->
firstChildConstraints.value = childConstraints
@@ -145,7 +149,7 @@
rule.runOnUiThreadIR {
activity.setContent {
- WithConstraints { constraints, _ ->
+ WithConstraints {
val outerModifier = Modifier.drawBehind {
val paint = Paint()
paint.color = model.outerColor
@@ -230,7 +234,7 @@
rule.runOnUiThreadIR {
activity.setContent {
- WithConstraints { _, _ ->
+ WithConstraints {
// this block is called as a subcomposition from LayoutNode.measure()
// VectorPainter introduces additional subcomposition which is closing the
// current frame and opens a new one. our model reads during measure()
@@ -240,7 +244,9 @@
VectorPainter(
name = "testPainter",
defaultWidth = 10.dp,
- defaultHeight = 10.dp) { _, _ -> /* intentionally empty */
+ defaultHeight = 10.dp
+ ) { _, _ ->
+ /* intentionally empty */
}
)
Layout(modifier = background, children = {}) { _, _, _ ->
@@ -268,7 +274,7 @@
rule.runOnUiThreadIR {
activity.setContent {
- WithConstraints { _, _ ->
+ WithConstraints {
recompositionsCount1++
Container(100.ipx, 100.ipx) {
model.value // model read
@@ -296,7 +302,7 @@
rule.runOnUiThreadIR {
activity.setContent {
ChangingConstraintsLayout(model) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
actualConstraints = constraints
assertEquals(1, latch.count)
latch.countDown()
@@ -324,7 +330,7 @@
rule.runOnUiThreadIR {
activity.setContent {
ChangingLayoutDirectionLayout(direction) {
- WithConstraints { _, layoutDirection ->
+ WithConstraints {
actualDirection = layoutDirection
assertEquals(1, latch.count)
latch.countDown()
@@ -361,7 +367,7 @@
assertTrue(withConstSize == null || withConstSize == it.size)
withConstSize = it.size
withConstLatch.countDown()
- }) { _, _ ->
+ }) {
Container(width = size.value, height = size.value,
modifier = Modifier.onPositioned {
// OnPositioned can be fired multiple times with the same value
@@ -404,7 +410,8 @@
activity.setContent {
Container(100.ipx, 100.ipx, backgroundModifier(Color.Red)) {
ChangingConstraintsLayout(model) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
+ val receivedConstraints = constraints
Container(100.ipx, 100.ipx, infiniteConstraints) {
Container(100.ipx, 100.ipx) {
Layout(
@@ -412,7 +419,7 @@
countdownLatchBackgroundModifier(Color.Yellow)
) { _, _, _ ->
// the same as the value inside ValueModel
- val size = constraints.maxWidth
+ val size = receivedConstraints.maxWidth
layout(size, size) {}
}
}
@@ -442,7 +449,7 @@
rule.runOnUiThread {
activity.setContent {
Container(width = 100.ipx, height = 100.ipx) {
- WithConstraints { _, _ ->
+ WithConstraints {
// this replicates the popular pattern we currently use
// where we save some data calculated in the measuring block
// and then use it in the next composition frame
@@ -479,7 +486,7 @@
// this component changes the constraints which triggers subcomposition
// within onMeasure block
ChangingConstraintsLayout(model) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
if (constraints.maxWidth == 100.ipx) {
// we will stop emmitting this layouts after constraints change
// Additional Container is needed so the Layout will be
@@ -540,7 +547,7 @@
}
layout(100.ipx, 100.ipx) {}
}
- WithConstraints { _, _ -> }
+ WithConstraints {}
}
}
assertTrue(drawlatch.await(1, TimeUnit.SECONDS))
@@ -560,7 +567,7 @@
outerComposeLatch.countDown()
val children = @Composable {
Layout(children = {
- WithConstraints { _, _ ->
+ WithConstraints {
assertEquals(1, innerComposeLatch.count)
innerComposeLatch.countDown()
Layout(children = emptyContent()) { _, _, _ ->
@@ -607,7 +614,7 @@
activity.setContent {
val state = state { 0 }
ContainerChildrenAffectsParentSize(100.ipx, 100.ipx) {
- WithConstraints { _, _ ->
+ WithConstraints {
Layout(
children = {},
modifier = countdownLatchBackgroundModifier(Color.Transparent)
@@ -620,7 +627,7 @@
}
}
Container(100.ipx, 100.ipx) {
- WithConstraints { _, _ -> }
+ WithConstraints {}
}
}
}
@@ -639,7 +646,7 @@
activity.setContent {
Layout(
children = @Composable {
- WithConstraints { _, layoutDirection ->
+ WithConstraints {
resultLayoutDirection = layoutDirection
}
},
@@ -668,7 +675,7 @@
children = @Composable {
WithConstraints(
modifier = layoutDirectionModifier(LayoutDirection.Rtl)
- ) { _, layoutDirection ->
+ ) {
resultLayoutDirection = layoutDirection
latch.countDown()
}
@@ -705,7 +712,7 @@
measurables.first().measure(zeroConstraints).place(0.ipx, 0.ipx)
}
}, children = {
- WithConstraints { _, _ ->
+ WithConstraints {
compositionLatch.countDown()
Layout(children = {}) { _, _, _ ->
childMeasureLatch.countDown()
@@ -728,7 +735,7 @@
rule.runOnUiThreadIR {
activity.setContent {
if (emit) {
- WithConstraints { _, _ ->
+ WithConstraints {
composedLatch.countDown()
onDispose {
disposedLatch.countDown()
@@ -746,6 +753,50 @@
assertTrue(disposedLatch.await(1, TimeUnit.SECONDS))
}
+ @Test
+ fun dpOverloadsHaveCorrectValues() {
+ val dpConstraints = DpConstraints(
+ minWidth = 5.dp,
+ maxWidth = 7.dp,
+ minHeight = 9.dp,
+ maxHeight = 12.dp
+ )
+ val latch = CountDownLatch(1)
+ var actualMinWidth: Dp = 0.dp
+ var actualMaxWidth: Dp = 0.dp
+ var actualMinHeight: Dp = 0.dp
+ var actualMaxHeight: Dp = 0.dp
+ var density: Density? = null
+ rule.runOnUiThreadIR {
+ activity.setContent {
+ Layout(
+ children = @Composable {
+ WithConstraints {
+ density = DensityAmbient.current
+ actualMinWidth = minWidth
+ actualMaxWidth = maxWidth
+ actualMinHeight = minHeight
+ actualMaxHeight = maxHeight
+ latch.countDown()
+ }
+ }
+ ) { m, _, _ ->
+ layout(0.ipx, 0.ipx) {
+ m.first().measure(Constraints(dpConstraints)).place(PxPosition.Origin)
+ }
+ }
+ }
+ }
+
+ assertTrue(latch.await(1, TimeUnit.SECONDS))
+ with(density!!) {
+ assertEquals(dpConstraints.minWidth.toIntPx(), actualMinWidth.toIntPx())
+ assertEquals(dpConstraints.maxWidth.toIntPx(), actualMaxWidth.toIntPx())
+ assertEquals(dpConstraints.minHeight.toIntPx(), actualMinHeight.toIntPx())
+ assertEquals(dpConstraints.maxHeight.toIntPx(), actualMaxHeight.toIntPx())
+ }
+ }
+
private fun takeScreenShot(size: Int): Bitmap {
assertTrue(drawLatch.await(1, TimeUnit.SECONDS))
val bitmap = rule.waitAndScreenShot()
@@ -771,7 +822,7 @@
@Composable
private fun TestLayout(@Suppress("UNUSED_PARAMETER") someInput: Int) {
Layout(children = {
- WithConstraints { _, _ ->
+ WithConstraints {
NeedsOtherMeasurementComposable(10.ipx)
}
}) { measurables, constraints, _ ->
diff --git a/ui/ui-core/src/main/java/androidx/ui/core/Layout.kt b/ui/ui-core/src/main/java/androidx/ui/core/Layout.kt
index d6f9137..9973c13 100644
--- a/ui/ui-core/src/main/java/androidx/ui/core/Layout.kt
+++ b/ui/ui-core/src/main/java/androidx/ui/core/Layout.kt
@@ -22,15 +22,18 @@
import androidx.compose.CompositionReference
import androidx.compose.FrameManager
import androidx.compose.Recomposer
+import androidx.compose.Stable
import androidx.compose.Untracked
import androidx.compose.compositionReference
import androidx.compose.currentComposer
import androidx.compose.onDispose
import androidx.compose.remember
import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
import androidx.ui.unit.IntPx
import androidx.ui.unit.IntPxPosition
import androidx.ui.unit.IntPxSize
+import androidx.ui.unit.ipx
import androidx.ui.unit.max
import androidx.ui.unit.min
@@ -439,7 +442,7 @@
/**
* A composable that defines its own content according to the available space, based on the incoming
- * constraints. Example usage:
+ * constraints or the current [LayoutDirection]. Example usage:
* @sample androidx.ui.framework.samples.WithConstraintsSample
*
* The composable will compose the given children, and will position the resulting layout composables
@@ -453,7 +456,7 @@
@Composable
fun WithConstraints(
modifier: Modifier = Modifier,
- children: @Composable() (Constraints, LayoutDirection) -> Unit
+ children: @Composable() WithConstraintsScope.() -> Unit
) {
val state = remember { WithConstrainsState() }
state.children = children
@@ -483,17 +486,62 @@
}
}
+/**
+ * Receiver scope being used by the children parameter of [WithConstraints]
+ */
+@Stable
+interface WithConstraintsScope {
+ /**
+ * The constraints given by the parent layout in pixels.
+ *
+ * Use [minWidth], [maxWidth], [minHeight] or [maxHeight] if you need value in [Dp].
+ */
+ val constraints: Constraints
+ /**
+ * The current [LayoutDirection] to be used by this layout.
+ */
+ val layoutDirection: LayoutDirection
+ /**
+ * The minimum width in [Dp].
+ *
+ * @see constraints for the values in pixels.
+ */
+ val minWidth: Dp
+ /**
+ * The maximum width in [Dp].
+ *
+ * @see constraints for the values in pixels.
+ */
+ val maxWidth: Dp
+ /**
+ * The minimum height in [Dp].
+ *
+ * @see constraints for the values in pixels.
+ */
+ val minHeight: Dp
+ /**
+ * The minimum height in [Dp].
+ *
+ * @see constraints for the values in pixels.
+ */
+ val maxHeight: Dp
+}
+
private class WithConstrainsState {
lateinit var recomposer: Recomposer
var compositionRef: CompositionReference? = null
lateinit var context: Context
val nodeRef = Ref<LayoutNode>()
- private var lastConstraints: Constraints? = null
- private var lastDirection: LayoutDirection? = null
- var children: @Composable() (Constraints, LayoutDirection) -> Unit = { _, _ -> }
+ var children: @Composable() WithConstraintsScope.() -> Unit = { }
var forceRecompose = false
var composition: Composition? = null
+ private var scope: WithConstraintsScope = WithConstraintsScopeImpl(
+ Density(1f),
+ Constraints.fixed(0.ipx, 0.ipx),
+ LayoutDirection.Ltr
+ )
+
val measureBlocks = object : LayoutNode.NoIntrinsicsMeasureBlocks(
error = "Intrinsic measurements are not supported by WithConstraints"
) {
@@ -504,12 +552,11 @@
layoutDirection: LayoutDirection
): MeasureScope.MeasureResult {
val root = nodeRef.value!!
- if (lastConstraints != constraints ||
- lastDirection != layoutDirection ||
+ if (scope.constraints != constraints ||
+ scope.layoutDirection != measureScope.layoutDirection ||
forceRecompose
) {
- lastConstraints = constraints
- lastDirection = layoutDirection
+ scope = WithConstraintsScopeImpl(measureScope, constraints, layoutDirection)
root.ignoreModelReads { subcompose() }
// if there were models created and read inside this subcomposition
// and we are going to modify this models within the same frame
@@ -537,12 +584,26 @@
}
fun subcompose() {
- val node = nodeRef.value!!
- val constraints = lastConstraints!!
// TODO(b/150390669): Review use of @Untracked
- composition = subcomposeInto(context, node, recomposer, compositionRef) @Untracked {
- children(constraints, node.measureScope.layoutDirection)
- }
+ composition =
+ subcomposeInto(context, nodeRef.value!!, recomposer, compositionRef) @Untracked {
+ scope.children()
+ }
forceRecompose = false
}
+
+ private data class WithConstraintsScopeImpl(
+ private val density: Density,
+ override val constraints: Constraints,
+ override val layoutDirection: LayoutDirection
+ ) : WithConstraintsScope {
+ override val minWidth: Dp
+ get() = with(density) { constraints.minWidth.toDp() }
+ override val maxWidth: Dp
+ get() = with(density) { constraints.maxWidth.toDp() }
+ override val minHeight: Dp
+ get() = with(density) { constraints.minHeight.toDp() }
+ override val maxHeight: Dp
+ get() = with(density) { constraints.maxHeight.toDp() }
+ }
}
\ No newline at end of file
diff --git a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
index 2abcbdc..dea2f38 100644
--- a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
+++ b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
@@ -155,14 +155,12 @@
@Composable
private fun LayoutWithConstraints(modifier: Modifier = Modifier, text: String) {
- WithConstraints(modifier) { constraints, direction ->
- with(DensityAmbient.current) {
- val w = (constraints.maxWidth / 3).toDp()
- val h = (constraints.maxHeight / 2).toDp()
- val color = if (direction == LayoutDirection.Ltr) Color.Red else Color.Magenta
- Stack(Modifier.preferredSize(w, h).drawBackground(color)) {
- Text(text, Modifier.gravity(Alignment.Center))
- }
+ WithConstraints(modifier) {
+ val w = maxWidth / 3
+ val h = maxHeight / 2
+ val color = if (layoutDirection == LayoutDirection.Ltr) Color.Red else Color.Magenta
+ Stack(Modifier.preferredSize(w, h).drawBackground(color)) {
+ Text(text, Modifier.gravity(Alignment.Center))
}
}
}
diff --git a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/AlignmentLineTest.kt b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/AlignmentLineTest.kt
index af40a0d..a2a18bc 100644
--- a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/AlignmentLineTest.kt
+++ b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/AlignmentLineTest.kt
@@ -313,7 +313,7 @@
Stack {
ConstrainedBox(DpConstraints(minHeight = minHeight)) {
AlignmentLineOffset(testLine) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
Assert.assertEquals(minHeight.toIntPx(), constraints.minHeight)
latch.countDown()
}
@@ -333,7 +333,7 @@
Stack {
ConstrainedBox(DpConstraints(minWidth = minWidth)) {
AlignmentLineOffset(testLine) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
Assert.assertEquals(minWidth.toIntPx(), constraints.minWidth)
latch.countDown()
}
@@ -353,7 +353,7 @@
Stack {
ConstrainedBox(DpConstraints(minHeight = minHeight)) {
CenterAlignmentLine(testLine) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
Assert.assertEquals(minHeight.toIntPx(), constraints.minHeight)
latch.countDown()
}
@@ -373,7 +373,7 @@
Stack {
ConstrainedBox(DpConstraints(minWidth = minWidth)) {
CenterAlignmentLine(testLine) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
Assert.assertEquals(minWidth.toIntPx(), constraints.minWidth)
latch.countDown()
}
diff --git a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutSizeTest.kt b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutSizeTest.kt
index 86cd891..d085107 100644
--- a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutSizeTest.kt
+++ b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/LayoutSizeTest.kt
@@ -1028,7 +1028,7 @@
val latch = CountDownLatch(1)
show {
Layout({
- WithConstraints(modifier) { constraints, _ ->
+ WithConstraints(modifier) {
assertEquals(expectedConstraints, constraints)
latch.countDown()
}
diff --git a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/RowColumnTest.kt b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/RowColumnTest.kt
index fa42e1d..cc7a346 100644
--- a/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/RowColumnTest.kt
+++ b/ui/ui-layout/src/androidTest/java/androidx/ui/layout/test/RowColumnTest.kt
@@ -1576,11 +1576,11 @@
WithInfiniteConstraints {
ConstrainedBox(DpConstraints(minWidth = rowMinWidth)) {
Row {
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(Constraints(), constraints)
FixedSizeLayout(noWeightChildWidth.toIntPx(), 0.ipx, mapOf())
}
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(Constraints(), constraints)
FixedSizeLayout(noWeightChildWidth.toIntPx(), 0.ipx, mapOf())
}
@@ -1621,7 +1621,7 @@
)
) {
Row {
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(
Constraints(
maxWidth = availableWidth.toIntPx(),
@@ -1631,7 +1631,7 @@
)
FixedSizeLayout(childWidth.toIntPx(), childHeight.toIntPx(), mapOf())
}
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(
Constraints(
maxWidth = availableWidth.toIntPx() - childWidth.toIntPx(),
@@ -2026,11 +2026,11 @@
WithInfiniteConstraints {
ConstrainedBox(DpConstraints(minHeight = columnMinHeight)) {
Column {
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(Constraints(), constraints)
FixedSizeLayout(0.ipx, noWeightChildHeight.toIntPx(), mapOf())
}
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(Constraints(), constraints)
FixedSizeLayout(0.ipx, noWeightChildHeight.toIntPx(), mapOf())
}
@@ -2070,7 +2070,7 @@
)
) {
Column {
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(
Constraints(
maxWidth = availableWidth.toIntPx(),
@@ -2080,7 +2080,7 @@
)
FixedSizeLayout(childWidth.toIntPx(), childHeight.toIntPx(), mapOf())
}
- WithConstraints { constraints, _ ->
+ WithConstraints {
assertEquals(
Constraints(
maxWidth = availableWidth.toIntPx(),
diff --git a/ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ColorPickerDemo.kt b/ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ColorPickerDemo.kt
index 8c64c54..f0d423f 100644
--- a/ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ColorPickerDemo.kt
+++ b/ui/ui-material/integration-tests/material-demos/src/main/java/androidx/ui/material/demos/ColorPickerDemo.kt
@@ -95,7 +95,7 @@
Modifier.padding(50.dp)
.fillMaxSize()
.aspectRatio(1f)
- ) { constraints, _ ->
+ ) {
val diameter = constraints.maxWidth.value
var position by state { PxPosition.Origin }
val colorWheel = remember(diameter) { ColorWheel(diameter) }
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt b/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
index 00e85b9..a05028b 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
@@ -86,15 +86,15 @@
bodyContent: @Composable() () -> Unit
) {
Box(Modifier.fillMaxSize()) {
- WithConstraints { pxConstraints, _ ->
+ WithConstraints {
// TODO : think about Infinite max bounds case
- if (!pxConstraints.hasBoundedWidth) {
+ if (!constraints.hasBoundedWidth) {
throw IllegalStateException("Drawer shouldn't have infinite width")
}
- val constraints = with(DensityAmbient.current) {
- DpConstraints(pxConstraints)
+ val dpConstraints = with(DensityAmbient.current) {
+ DpConstraints(constraints)
}
- val minValue = -pxConstraints.maxWidth.value.toFloat()
+ val minValue = -constraints.maxWidth.value.toFloat()
val maxValue = 0f
val anchors = listOf(minValue to DrawerState.Closed, maxValue to DrawerState.Opened)
@@ -113,7 +113,7 @@
Scrim(drawerState, onStateChange, fraction = {
calculateFraction(minValue, maxValue, model.value)
})
- DrawerContent(model, constraints, drawerContent)
+ DrawerContent(model, dpConstraints, drawerContent)
}
}
}
@@ -152,16 +152,16 @@
bodyContent: @Composable() () -> Unit
) {
Box(Modifier.fillMaxSize()) {
- WithConstraints { pxConstraints, _ ->
+ WithConstraints {
// TODO : think about Infinite max bounds case
- if (!pxConstraints.hasBoundedHeight) {
+ if (!constraints.hasBoundedHeight) {
throw IllegalStateException("Drawer shouldn't have infinite height")
}
- val constraints = with(DensityAmbient.current) {
- DpConstraints(pxConstraints)
+ val dpConstraints = with(DensityAmbient.current) {
+ DpConstraints(constraints)
}
val minValue = 0f
- val maxValue = pxConstraints.maxHeight.value.toFloat()
+ val maxValue = constraints.maxHeight.value.toFloat()
// TODO: add proper landscape support
val isLandscape = constraints.maxWidth > constraints.maxHeight
@@ -196,7 +196,7 @@
// as we scroll "from height to 0" , need to reverse fraction
1 - calculateFraction(openedValue, maxValue, model.value)
})
- BottomDrawerContent(model, constraints, drawerContent)
+ BottomDrawerContent(model, dpConstraints, drawerContent)
}
}
}
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt b/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
index 55533ae..072eefe 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
@@ -108,7 +108,7 @@
position.scaledValue = value
Semantics(container = true, mergeAllDescendants = true) {
Box(modifier = modifier) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
val maxPx = constraints.maxWidth.value.toFloat()
val minPx = 0f
position.setBounds(minPx, maxPx)
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt b/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
index 5d25bfa..8260c92 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
@@ -153,7 +153,7 @@
tab: @Composable() (Int, T) -> Unit
) {
Surface(modifier = modifier, color = backgroundColor, contentColor = contentColor) {
- WithConstraints { constraints, _ ->
+ WithConstraints {
val width = constraints.maxWidth
// TODO: force scrollable for tabs that will be too small if they take up equal space?
if (scrollable) {