Last active
August 5, 2020 16:20
-
-
Save catalinghita8/5f9e5e0a3ce1f6482baa90ee0f9bc4ba to your computer and use it in GitHub Desktop.
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 LocalDataSource() { | |
| private val jsonFile = resources.getFile(JSON_FILE_TAG) | |
| fun getCachedData() = jsonFile.toString() | |
| } | |
| class DataViewModel() { | |
| private val localDataClient = LocalDataSource() | |
| fun getData() = localDataClient.getCachedData() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment