9:57 which one is better? sealed class or object with constant val : like : ---------------------- object Destination { const val MAIN_SCREEN = "main_screen" const val HOME_SCREEN = "home_screen" } -------------------- NavHost(navController = navController, startDestination =Destination.MAIN_SCREEN, builder = { composable(Destination.MAIN_SCREEN) { MainScreen(navController) } composable(Destination.HOME_SCREEN) { HomeScreen(navController) } -------------------
Well explained ✅
best video mam, uh r amazing teacher thnkss👏🏼
Thank you :-)
Thank you
Good thanks
Please Create a Video Voice Chat Room App
Thanks.
9:57 which one is better? sealed class or object with constant val : like :
----------------------
object Destination {
const val MAIN_SCREEN = "main_screen"
const val HOME_SCREEN = "home_screen"
}
--------------------
NavHost(navController = navController, startDestination =Destination.MAIN_SCREEN, builder = {
composable(Destination.MAIN_SCREEN) {
MainScreen(navController)
}
composable(Destination.HOME_SCREEN) {
HomeScreen(navController)
}
-------------------
thank you