Created
June 17, 2024 09:28
-
-
Save sasssass/54ef0d50dafcabf180d247ccc66d3761 to your computer and use it in GitHub Desktop.
ScreenWithOptionalArguments.kt
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
@NavigationNode(route = "screen_with_optional_arguments", args = arrayOf("id", "name"), | |
optionalArgs = arrayOf("age","nickName") | |
) | |
@Composable | |
fun ScreenWithOptionalArguments( | |
id: String, | |
name: String, | |
nickName: String?, | |
age: String? | |
) { | |
Column(modifier = Modifier.fillMaxSize()) { | |
Text(text = "OK, you're $name with id as $name, your nick name is ${nickName?:"Undefined"}, and your age is ${age?:"Undefined"}") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment