Alex Petitjean
10/10/2022, 10:47 PM@Composable
parameter be marked as @Immutable
?
I've got something like this for controlling what is in a TopAppBar
as part of a `Scaffold`:
private data class MyTopAppBarState(
@StringRes val titleResId: Int,
val actions: (@Composable RowScope.() -> Unit)?,
)
The contents of the actions
Composable lambda are `TextButton`s with onClick
lambdas that would likely reference a ViewModel. I don't know if that matters, but it feels like it might.Zach Klippenstein (he/him) [MOD]
10/11/2022, 4:41 AMAlex Petitjean
10/11/2022, 4:27 PM@Immutable
. I'll do some more testing on it I suppose.