vide
01/02/2023, 9:12 AM@Immutable
but compose metrics reports it as unstable. Am I doing something wrong here? I think this only started happening when I refactored the class to a shared packagevide
01/02/2023, 9:16 AMpackage app.shared
@Immutable
data class MyImmutableClass(val foo: Foo)
package app.main
@Composable
fun MyComposable(param: MyImmutableClass) {...}
Results in the following metrics:
restartable fun MyComposable(
unstable param: MyImmutableClass
)
vide
01/02/2023, 9:33 AMandroidx.compose.runtime.Immutable
instead of javax.annotation.concurrent.Immutable
which Android Studio recommends first 😄sindrenm
01/02/2023, 10:57 AMjavax.annotation.concurrent.Immutable
by putting it the list found at Settings → Editor → General → Auto Import → Exclude from auto-import […]. I've found this very useful for Compose. simple smile