Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
787 B
7
Indexable
Never
//The Composable part used to navigate from one screen to another
// This also passes two args goal_id and goal_name that will translate to parentId and parentName in database(eventually)

composable(route =  GoalExpansionScreenRoutes.
                        GoalExpansion.route
        )
        {
            val v = hiltViewModel<GoalExpansionViewModel>()
            val state by v.state.collectAsState()
            val list by v.cl.collectAsState(emptyList<RealmEntity>())

            var goalName = it.arguments?.getString("goal_name")
            var goalId = it.arguments?.getString("goal_id")
            GoalExpansionScreen(
                goalName!!,
                goalId!!,
            state = state,
            onEvent = v::onEvent,
            list = list)
        }