clhols
05/07/2020, 4:31 PMType 'State<List<MuNowNext>>' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
I don't get that error message. I see State has this extension:
State<T>.getValue(thisObj: Any?, property: KProperty<*>)
An Nothing? is not Any?, so why does it want a Nothing? ?
Code is:
@Composable
fun ChannelsList(channels: LiveData<List<MuNowNext>>) {
val channelsList by channels.observeAsState(initial = emptyList())
Andrew Neal
05/07/2020, 4:34 PMimport androidx.compose.setValue
import androidx.compose.getValue
Sometimes IntelliJ doesn't always suggest alt + enter
to import them for you, at least in my experience.clhols
05/07/2020, 4:37 PM