-
-
Save kasem-sm/14cfc183b9683f99038d9f6bac42e397 to your computer and use it in GitHub Desktop.
When Jetpack's Glance met his fellow worker, Work Manager
This file contains 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 MyWidget() : GlanceAppWidget() { | |
override val stateDefinition = PreferencesGlanceStateDefinition | |
@Composable | |
override fun Content() { | |
val state = currentState<Preferences>() | |
val articleTitle = state[stringPreferencesKey("article_title_key")] ?: "" | |
Text(text = articletitle) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment