NearbyZonesViewModel

Used by the Nearby Zones module, for doing async tasks.

Author

Arnau Mora

Since

20220130

Parameters

application

The application that requests the view model initialization.

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun <T : Application> getApplication(): T
Link copied to clipboard
fun loadZones()

Starts loading the zones that are indexed into loadZones. Updates the result at zones.

Properties

Link copied to clipboard

The loaded zones from loadZones.

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.