Jetpack Compose Instantiate a Class from Composable
I have my following logic class
class Logic(){
private val state: MyViewModel = MyViewModel()
@Composable
fun PublicComposable(){
Text("My public composable")
}
fun setSomething(value:String){
state.setSomething(value)
}
fun getSomething(){
return state.getSomething()
}
}
I have my ViewModel which should not be accessible to the UI but only to the Logic class
class MyViewModel():ViewModel(){
private val _capturedCard:...