NavigationChromeState
Everything a navigation header needs, derived from the current navigation state.
Obtained from rememberNavigationChrome. Reaktiv supplies the values and the back action, the caller supplies the bar, so the same facts can drive a Material app bar, an iOS styled one, or anything else.
val chrome = rememberNavigationChrome()
TopAppBar(
title = { Text(chrome.title.orEmpty()) },
navigationIcon = {
chrome.onBack?.let { back -> IconButton(back) { Icon(ArrowBack, null) } }
}
)Content copied to clipboard