What's the difference between Navigator 1.0 and Navigator 2.0?
Short Answer
Navigator 1.0 is imperative — you push/pop routes as commands; Navigator 2.0 is declarative — you describe the current stack of pages as a list derived from app state, which is what enables deep linking and browser back-button support to work correctly.
With Navigator 1.0's Navigator.push()/Navigator.pop(), the navigation stack is built up imperatively as a side effect of your code running — there's no single source of truth describing 'what the stack currently looks like,' making browser URLs, deep links, and state restoration awkward since you'd need to manually replay a sequence of pushes to reach an arbitrary state.
Navigator 2.0 introduces Router, RouterDelegate, and RouteInformationParser: you maintain your own app state, and the Navigator widget's pages list is derived from that state declaratively. This makes it possible to jump directly to a deep-linked state, since the pages list can be constructed for any given URL without replaying pushes.
In practice, most apps use go_router (built on Navigator 2.0) rather than the raw API directly, since it hides most of the boilerplate behind a simpler declarative route table.
Common Mistakes
- ×Believing Navigator 2.0 replaced Navigator 1.0 — the imperative push/pop API still works and is fine for apps that don't need deep linking/URL sync.
- ×Hand-rolling raw Navigator 2.0 for a simple app instead of reaching for go_router.
Interview Tips
- →Mention go_router specifically — most real-world Flutter apps use it rather than raw Navigator 2.0.