Avanzando en primer ejercicio con VM

This commit is contained in:
Salatiel Genol 2023-03-24 15:51:08 +01:00
parent 42e2855620
commit 0ec210ac45
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package ies.teis.genol_salatiel_ex2tdist.ui.exerciseOne
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
class ExerciseOneViewModel: ViewModel() {
var showLazy by mutableStateOf(false)
private set
fun onChangeShowLazy(){
showLazy = !showLazy
}
}