Recipes
Stack rewrites and typed results
Choose the exact mutation, retain a stable anchor, and distinguish popped values from removed entries.
Stack rewrites and typed results
Replace the current screen
Use replaceTop when the old entry lifecycle must end. Use reconfigureTop when the same logical entry and outstanding ticket must survive updated Destination data.
End a flow at a known anchor
Use pushAndRemoveUntil to retain one matching entry and push a new Destination. Use replaceTail when several replacement entries must appear atomically. Use popUntil when no replacement is needed.
Prefer NavigationEntryIdMatcher for one exact runtime entry and NavigationRouteIdMatcher for the nearest entry built by a route definition.
Replace a complete Scope
Use setStack or replaceAll with an exact list of typed Targets. No intermediate page is exposed while the transaction commits.
Interpret completion
NavigationPopped<R> carries R?; platform Back may return null. NavigationRemoved<R> means a rewrite ended the entry without a pop result. NavigationNotCommitted<R> means policies or resolution prevented creation.