KotlinLeaner
11/17/2022, 9:23 AMval isBluetoothEnabled = MutableStateFlow(false)
whenever I tried to use the value of variable like this
.value
i.e. isBluetoothEnabled.value
. So I am trying to use delegate property to avoid using .value
val isBluetoothEnabled by MutableStateFlow(false)
but I am getting weird error
Type 'MutableStateFlow<TypeVariable(T)>' has no method 'getValue(PairViewModel, KProperty<*>)' and thus it cannot serve as a delegate
Michael Paus
11/17/2022, 9:31 AMimport androidx.compose.runtime.*
KotlinLeaner
11/17/2022, 9:32 AMKotlinLeaner
11/17/2022, 9:35 AMkotlinx.coroutines.flow
part not compose stuff.Michael Paus
11/17/2022, 9:35 AMKotlinLeaner
11/17/2022, 9:35 AM