Marcel
10/08/2024, 10:43 AMabstract class StateFlowViewModelState, Action() : ViewModel() {
abstract val initialState: State
protected val mutableState: MutableStateFlowState by lazy { MutableStateFlow(initialState) }
open val state: StateFlowState
get() = mutableState
... // Some other stuff
}
@KoinViewModel
class FeatureViewModel(
@Provided private val permissionsController: PermissionsController,
private val stateHandler: FeatureStateHandler,
) : StateFlowViewModelFeatureState, FeatureAction() {
override val initialState = stateHandler.handleInitialState()
... // Some other stuff
}
state anywhere, I have even tried adding a silly fun helloIos() function and that one is not available either.Marcel
10/08/2024, 1:33 PM