RepoViewModel

class RepoViewModel @Inject constructor(client: AppHttpClient, dataService: AppDataService, savedStateHandle: SavedStateHandle) : ViewModel

ViewModel for screen RepoScreen

Constructors

RepoViewModel
Link copied to clipboard
@Inject
fun RepoViewModel(client: AppHttpClient, dataService: AppDataService, savedStateHandle: SavedStateHandle)

Functions

updateRepo
Link copied to clipboard
fun updateRepo()

Query update repo

Properties

_error
Link copied to clipboard
private val _error: MutableStateFlow<String?>

Error response

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

Loading query

client
Link copied to clipboard
private val client: AppHttpClient
dataService
Link copied to clipboard
private val dataService: AppDataService
error
Link copied to clipboard
val error: StateFlow<String?>

StateFlow for _error

id
Link copied to clipboard
val id: String

Repo id

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

StateFlow for _loading

repo
Link copied to clipboard
val repo: Flow<RepoModel>

Listen repo model

savedStateHandle
Link copied to clipboard
private val savedStateHandle: SavedStateHandle
url
Link copied to clipboard
val url: String

Repo url for update