Advanced Topics
Patterns that build on the core concepts.
- Results —
NavigationKey.WithResult<R>,complete(value), andregisterForNavigationResult. With two sub-pages on chaining multi-step flows: embedded flows for short callback chains, managed flows for longer or branching sequences. - View Models —
by navigationHandle<MyKey>()inside a ViewModel,createEnroViewModel { }from a Composable, and shared state across destinations. - Animations —
NavigationAnimations, per-element animation primitives, predictive back, and shared elements. - Testing —
runEnroTest,EnroTestRule,TestNavigationHandle, and the assertion surface. - Plugins — observe every destination’s lifecycle (open, active, close) for cross-cutting concerns like analytics, telemetry, and instance-metadata tagging.