ComposableContract

fun ComposableContract(restartable: Boolean = true, readonly: Boolean = false, tracked: Boolean = true, preventCapture: Boolean = false)

Parameters

preventCapture

if true, this will prevent composable calls from happening inside of the function that it applies to. This is usually applied to lambda parameters of inline functions that ought to be safely inlined but cannot safely have composable calls in them

readonly

if true, no group will be generated around the body of the function it annotates . This is not safe unless the body of the function only executes "read" operations on the passed in composer..

restartable

if false, this will prevent code from being generated which allow this function's execution to be skipped or restarted. This may be desirable for small functions which just directly call another composable function and have very little machinery in them directly.

tracked

if false, this will disable lambda optimizations such as tracking execution of composable function expressions or remembering a function expression value based on its capture variables. This flag is only meaningful when applied to @Composable lambda expressions