Last active
December 5, 2020 18:01
-
-
Save hardik-trivedi/acbfd6c1b7ab08273f279bff1529c621 to your computer and use it in GitHub Desktop.
Android ViewModel class using Shared NovelCovidApiClient
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CountryListViewModel(private val apiClient: NovelCovidApiClient) : ViewModel() { | |
val countries: LiveData<List<CountryItem>> = liveData { | |
emit(apiClient.getAffectedCountries()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment