App-Support > healthstack.app.viewmodel > TaskViewModel

TaskViewModel

[androidJvm]
class TaskViewModel(taskRepository: TaskRepository, settingPreference: SettingPreference) : ViewModel

Constructors

TaskViewModel

[androidJvm]
fun TaskViewModel(taskRepository: TaskRepository, settingPreference: SettingPreference)

Types

Name Summary
TasksState

[androidJvm]
data class TasksState(val tasks: List<Task>)

Functions

Name Summary
addCloseable

[androidJvm]
open fun addCloseable(@NonNullp0: Closeable)

clear

[androidJvm]
@MainThread
fun clear()

done

[androidJvm]
fun done(task: Task)

getTag

[androidJvm]
open fun <T : Any> getTag(p0: String): T

onCleared

[androidJvm]
open fun onCleared()

setTagIfAbsent

[androidJvm]
open fun <T : Any> setTagIfAbsent(p0: String, p1: T): T

syncTasks

[androidJvm]
fun syncTasks()

Properties

Name Summary
activeTasks

[androidJvm]
val activeTasks: StateFlow<TaskViewModel.TasksState>

completedTasks

[androidJvm]
val completedTasks: StateFlow<TaskViewModel.TasksState>

todayTasks

[androidJvm]
val todayTasks: StateFlow<TaskViewModel.TasksState>