MainActivityViewModel

class MainActivityViewModel @Inject constructor(userPreferencesDataSource: UserPreferencesDataSource) : ViewModel

Annotates a ViewModel class that is managed by Hilt's dependency injection system.

Parameters

userPreferencesDataSource

The repository providing access to user data.

Constructors

Link copied to clipboard
@Inject
constructor(userPreferencesDataSource: UserPreferencesDataSource)

Creates a MainActivityViewModel instance.

Properties

Link copied to clipboard

Represents the state of the UI for user data.

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard