rememberNavigationChrome

Derives the values a navigation header needs from the current navigation state.

Titles resolve in composition, so a titleResource built from stringResource is localised exactly as it is anywhere else. The title follows an in flight gesture, because it reads the same perceived entry the renderer does.

Scaffold(topBar = {
if (navigationState.showsNavigationChrome) {
val chrome = rememberNavigationChrome()
TopAppBar(title = { Text(chrome.title.orEmpty()) })
}
}) { ... }

See also