This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.random.Random | |
val myInt = Random.nextInt() | |
val myBool = Random.nextBoolean() | |
// Expression - Exhaustive Required | |
val result = when(myInt) { | |
1 -> "I'm #1!" | |
else -> "I'm something else" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `this test fails`() = runTest { | |
val number = (0..2).asFlow() | |
val intro = listOf("Hello").asFlow() | |
val combined = combine(intro, number) { first, second -> | |
"$first $second" | |
} | |
combined.test { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reads "One" -> "Two" -> "Three" | |
Row(modifier = Modifier.semantics(mergeDescendants = false) { }) { | |
Text("One") | |
Column { | |
Text("Two") | |
Text("Three") | |
} | |
} | |
// Reads "One Two Three" |
NewerOlder