inline fun Navigator.resetRoot(newRoot: Screen, saveState: (currentRoot: Screen?) -> Boolean = { false }, restoreState: (currentRoot: Screen?) -> Boolean = { false }): List<Screen>(source)

Clear the existing backstack of screens and navigate to newRoot.

This is useful in preventing the user from returning to a completed workflow, such as a tutorial, wizard, or authentication flow.

This version of the function provides easy to lambdas for saveState and restoreState allowing computation of the values based on the current root screen.