trashcoder
09/19/2021, 11:30 AMScaffold
and navigate with the Drawer
(1 item for each screen in the drawer which will then change router state on click).
Since the Scaffold
has multiple parameters related to each screen (title, actions, content), i dont know if it should be part of the root content or part of each screen's content..?
Let's say, i would use it as root content. Is it ok to check routerState/children for each Scaffold
section and then call composable functions depending on the child for each section: Child1Title(), Child1Actions(), Child1Content()?
(Are there any examples for Drawer
navigation with Decompose?)Arkadii Ivanov
09/19/2021, 11:55 AMScaffold
in the root's UI. And as you suggested, I would use:
val routerState = root.routerState.subscribeAsState()
routerState.activeChild
trashcoder
09/19/2021, 12:01 PM