Rudy Sulley
05/15/2024, 5:39 PMsealed class Screens {
@Serializable
data object Home : Screens()
@Serializable
data object About : Screens()
}
fun NavGraphBuilder.aboutScreen(
modifier: Modifier = Modifier,
onBackButtonClick: () -> Unit,
) {
composable<Screens.About> {
AboutScreen(
modifier = modifier,
onBackButtonClick = onBackButtonClick,
)
}
}
Or would you throw each route definition in separate files, probably where the composable is defined or within their respective packages?Pablichjenkov
05/15/2024, 6:59 PMRudy Sulley
05/15/2024, 7:28 PMIan Lake
05/15/2024, 7:52 PM