Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private fun toggleTheme(isDark: Boolean): Boolean {
val mode = when (isDark) {
true -> LIGHT_MODE
false -> DARK_MODE
}
ThemeManager.applyTheme(mode)
preferenceManager.saveThemePreference(mode)
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment