Created
September 3, 2022 01:29
-
-
Save fayaz07/0246bac3fa2da49b7551344431e14a85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateViewModel(private val todoDao: TodoDao) : ViewModel() { | |
fun create(task: String) { | |
viewModelScope.launch { | |
todoDao.insert(NewTodo(task)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment