Skip to content

Instantly share code, notes, and snippets.

@raamcosta
Last active January 8, 2022 21:41
Show Gist options
  • Save raamcosta/6a4118655c8348db1e0601029a2001d5 to your computer and use it in GitHub Desktop.
Save raamcosta/6a4118655c8348db1e0601029a2001d5 to your computer and use it in GitHub Desktop.
@Composable
fun LoginScreen(
navigateToHome: () -> Unit
) {
/*...*/
Button (onClick = navigateToHome) {
/*...*/
}
@Composable
fun HomeScreen(
navigateToProfile: (String, Boolean) -> Unit,
navigateToSearch: (String?) -> Unit
) {
/*...*/
Button(onClick = { navigateToProfile("someId", true) }) {
/*...*/
Button(onClick = { navigateToSearch("query") }) {
/*...*/
}
@Composable
fun ProfileScreen(
id: String,
isEditable: Boolean = false
) { /*...*/ }
@Composable
fun SearchScreen(
query: String?
) { /*...*/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment