Archie
11/05/2020, 5:40 AMstringResource(...)
? Since navArgument(...)
isn't a @Composable
function, its not possible to do:
composable(
route = Screen.route + ...,
arguments = listOf(
navArgument("NAME") {
defaultValue = stringResource(id = R.string.placeholder)
},
),
) {
...
}
Ian Lake
11/05/2020, 5:45 AMdefaultValue = null
and then use backStackEntry?.arguments?.getString("NAME") ?: stringResource(id = R.string.placeholder)
Ian Lake
11/05/2020, 5:46 AMArchie
11/05/2020, 5:47 AM