package Ġcom . by j use x amp rep . hack athon . ui . navigation Ċ Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . navigation . compose . Nav Host Ċ import Ġandroidx . navigation . compose . comp osable Ċ import Ġandroidx . navigation . compose . remember Nav Controller Ċ import Ġcom . by j use x amp rep . hack athon . ui . comp os ables . home _ screen . Main Screen Composable Ċ import Ġcom . by j use x amp rep . hack athon . ui . comp os ables . home _ screen . Main ViewModel Ċ import Ġcom . by j use x amp rep . hack athon . ui . comp os ables . name _ screen . Name Screen Composable Ċ Ċ @ Composable Ċ fun ĠNavigation ( main ViewModel : ĠMain ViewModel ) Ġ{ ĊĊĠĠĠ Ġval Ġnav Controller Ġ= Ġremember Nav Controller () ĊĊĠĠĠ ĠNav Host ( nav Controller Ġ= Ġnav Controller , Ġstart Destination Ġ= ĠScreen . Main Screen . route ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcomp osable ( route Ġ= ĠScreen . Main Screen . route ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMain Screen Composable ( nav Controller Ġ= Ġnav Controller , ĠviewModel Ġ= Ġmain ViewModel ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcomp osable ( route Ġ= ĠScreen . Name Screen . route ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠName Screen Composable ( nav Controller Ġ= Ġnav Controller ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ }