Slide 7
Slide 7 text
実装
@Composable
fun MainViewScreen(userList: List) {
val navigator = rememberListDetailPaneScaffoldNavigator()
BackHandler(navigator.canNavigateBack()) {
navigator.navigateBack()
}
ListDetailPaneScaffold(
directive = navigator.scaffoldDirective,
value = navigator.scaffoldValue,
listPane = {
AnimatedPane {
UserList(userList = userList,
onItemClicked = { item ->
navigator.navigateTo(ListDetailPaneScaffoldRole.Detail, item)
})
}
},
detailPane = {
AnimatedPane {
navigator.currentDestination?.content?.let {
UserDetail(it)
}
}
}
)
}