SettingsViewModel

class SettingsViewModel @Inject constructor(apiService: SettingsApiService, preferences: SettingsPreferences) : ViewModel

ViewModel for module

Author

Vitaliy Zarubin

Constructors

SettingsViewModel
Link copied to clipboard
@Inject
fun SettingsViewModel(apiService: SettingsApiService, preferences: SettingsPreferences)

Functions

updateSettings
Link copied to clipboard
fun updateSettings()

Function stub as an example of how it works

Properties

_loading
Link copied to clipboard
private val _loading: MutableStateFlow<Boolean>

MutableStateFlow for loading state

apiService
Link copied to clipboard
private val apiService: SettingsApiService

service http query

loading
Link copied to clipboard
val loading: StateFlow<Boolean>

StateFlow for _loading

preferences
Link copied to clipboard
private val preferences: SettingsPreferences

service shared preference