Nino
11/15/2022, 4:58 PMarekolek
11/15/2022, 5:00 PMimport androidx.compose.runtime.remember
to import androidx.compose.runtime.*
and it should work (also if you organize imports afterwards)
the problem is missing imports for getValue
and setValue
Nino
11/15/2022, 5:03 PMmcpiroman
11/16/2022, 9:52 AMNino
11/16/2022, 9:53 AMarekolek
11/16/2022, 9:54 AMNino
11/16/2022, 9:55 AMarekolek
11/16/2022, 10:02 AMmcpiroman
11/16/2022, 10:12 AMinline operator fun <T> State<T>.getValue(thisObj: Any?, property: KProperty<*>): T = value
), so that you can use State
objects with the by
notation. And all extension functions require and import.
It's just standard kotlin, other libs or you too can do it.
So if anything it could be viewed as a problem in the design of Kotlin itself, but then I don't know how to handle it better.arekolek
11/16/2022, 10:16 AM