DataClassItemViewModel

Constructors

Link copied to clipboard

Types

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun <T : Application> getApplication(): T
Link copied to clipboard
fun <T : DataClass<*, *, *>, R : Comparable<R>> loadChildren(dataClass: T, sortBy: (DataClassImpl) -> R)

Properties

Link copied to clipboard

Extensions

Link copied to clipboard
Link copied to clipboard

Returns the application's context attached to the view model.

Link copied to clipboard
suspend fun <T> AndroidViewModel.get(key: Preferences.Key<T>, default: T): T

Gets the last value stored at key, or returns default if there are no stored values.

Link copied to clipboard
fun <T> AndroidViewModel.set(key: Preferences.Key<T>, value: T): Job

Updates the value at key with value using the scope of the view model.