https://android.googlesource.com/platform/ manifest -b androidx-master-dev repo sync -j8 -c Download the code (and grab a coffee while we pull down 6GB)
@Model class meant to * wrap around a single value. * It is used in the `+state` and `+stateFor` effects. */ @Model class State<T> @PublishedApi internal constructor(value:T) : Framed { /* ... */ }
a class which represents your * application's data model, and will cause instances of the * class to become observable, such that a read of a property * of an instance of this class during the invocation of a * composable function will cause that component to be * "subscribed" to mutations of that instance. Composable * functions which directly or indirectly read properties * of the model class, the composables will be recomposed * whenever any properties of the the model are written to. */
for when "down" is not a // file level val, it's not memoized // correctly val x = down.x val y = down.y val paint = Paint().apply { color = Color( alpha = /* ... */ red = 0, green = 235, Jetpack Compose
correctly val x = down.x val y = down.y val paint = Paint().apply { color = Color( alpha = /* ... */ red = 0, green = 235, blue = 224 ) } val radius = state[radius] Draw { canvas, _ -> Jetpack Compose