Package selection guidance compiled from public package information, community data, and project usage.
Routemaster is a lightweight, easy-to-use routing solution for Flutter applications across web, mobile, and desktop platforms. It enables URL-based navigation with support for nested routes and tabbed navigation, simplifying complex route management. Built with simplicity and developer experience in mind, Routemaster integrates seamlessly into existing Flutter projects. Its clean API allows intuitive handling of route transitions, dynamic parameters, and deep linking. Ideal for apps requiring structured navigation without boilerplate code.
Use cases
Single-page applications with dynamic content
Multi-tab interfaces on mobile and web
Nested route structures in complex UIs
Deep linking and URL synchronization
Cross-platform apps needing consistent routing
Simple navigation with minimal setup
Key features
URL-based routing
Support for nested and tabbed routes
Minimal boilerplate
Cross-platform compatibility
Easy integration with existing Flutter apps
Dynamic route parameters
Suitable for
Developers building cross-platform Flutter apps
Teams prioritizing clean, maintainable routing logic
Projects requiring deep linking or SPA-like behavior
Apps with complex navigation hierarchies
Beginners seeking an intuitive routing solution
Considerations
Limited to Flutter's native navigation model
May require additional state management for advanced use cases
Not ideal for highly custom routing behaviors beyond standard patterns
No built-in support for route guards or authentication redirects
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Routemaster
Hello! Routemaster is an easy-to-use router for Flutter, which wraps over Flutter's Router API.
Features
Simple declarative mapping from URLs to pages
Easy-to-use API: just Routemaster.of(context).push('/page')
Really easy nested navigation support for tabs
Multiple route maps: for example one for a logged in user, another for logged out
Observers to easily listen to route changes
Covered by over 250 unit, widget and integration tests
Here's the entire routing setup needed for an app featuring tabs and pushed routes:
Routemaster generates pages based on the current path. This is the key concept of its path-base routing. Path structure matters.
It uses the path to decide where a page should be pushed. This means the path needs to match your intended page hierarchy.
For example:
'/tabs': (route) => TabPage(child: HomePage(), paths: ['one', 'two']),
// First tab default page'/tabs/one': (route) => MaterialPage(child: TabOnePage()),
// Second tab default page'/tabs/two': (route) => MaterialPage(child: TabTwoPage()),
// Second tab sub-page: will be displayed in the 2nd tab because it// starts with '/tabs/two''/tabs/two/subpage': (route) => MaterialPage(child: TabTwoPage()),
// Not a tab page: will not be displayed in in a tab// because the path doesn't start with '/tabs/one' or '/tabs/two''/tabs/notInATab': (route) => MaterialPage(child: NotTabPage()),
Any child paths that begin with /tabs/one or /tabs/two will be pushed into the correct tab.
When navigating to /tabs/two/subpage, the TabPage will be asked "hey, do you know how to handle this path?" and it'll go "sure! it starts with /tabs/two, so it goes in my second tab".
However, navigating to /tabs/notInATab will not be displayed in a tab, but pushed on top of the tab bar.
TabPage will be all "yeah sorry, no idea what to do with that, doesn't match any of my tab paths" and its parent will be asked to hande it.