rememberNavigationState

Creates a NavigationState that survives configuration changes and process death.

Each top-level destination gets its own back stack, so switching tabs preserves where the user was in each one. A separate stack of top-level keys records the order tabs were visited, which is what back navigation walks.

Parameters

startKey

The destination the user exits the app from. Must be in topLevelKeys.

topLevelKeys

Every top-level destination, typically one per navigation bar item.