Skip to content

Instantly share code, notes, and snippets.

@walnashgit
Created May 8, 2021 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walnashgit/c989cd961fac16a669876f5deb9f9945 to your computer and use it in GitHub Desktop.
Save walnashgit/c989cd961fac16a669876f5deb9f9945 to your computer and use it in GitHub Desktop.
@Composable
fun Favorite(modifier: Modifier = Modifier, viewModel: MainViewModel) {
viewModel.setCurrentScreen(Screens.HomeScreens.Favorite)
var click by rememberSaveable { mutableStateOf(0) }
Column(
modifier = modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(text = "Favorite.", style = MaterialTheme.typography.h4)
Button(
onClick = {
click++
}
) {
Text("clicked: $click")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment