Created
December 13, 2020 15:11
-
-
Save vamsitallapudi/c0a0d5514216c2dff3e744f1f7959300 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 PrefLocalDataSourceImpl(val context: Context) : PrefRepo { | |
override fun updateDarkMode(enabled: Boolean) { | |
val sharedPreferences = context.getSharedPreferences("darkModePref", Context.MODE_PRIVATE) | |
val editor = sharedPreferences.edit() | |
editor.putBoolean("darkMode", true) | |
editor.apply() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment