Interesting in development

safe_route: type-safe navigation for Flutter

We type the arguments and results of Flutter routes so that navigation errors are caught at compile time, not while the app is running.

safe_route: type-safe navigation for Flutter

The standard Navigator.pushNamed takes arguments as Object?, and the compiler does not check that a screen gets data of the right type. A mistake there only shows up while the app is running.

safe_route describes each route as a SafeRoute with an argument type and a result type, and SafeRouter registers them and plugs into MaterialApp through onGenerateRoute. An extension on NavigatorState provides typed counterparts of the standard methods: pushRoute instead of pushNamed, popRoute instead of pop, plus variants for replacing a screen, clearing the stack and state restoration. Nested routes are supported too.

The package suits teams that use named routes and want the compiler to check the data passed between screens. Navigation code becomes easier to read, and mistakes are found earlier.

Open on pub.dev

More articles

08 / FAQ

Still have questions?

It depends on the scope: a landing page, a corporate site and a web service are priced differently. Get a rough range in our calculator in 30 seconds; the exact price is fixed before work starts.

The price depends on the number of screens, platforms (iOS, Android) and the backend. Describe your idea in the calculator to see the budget range, timeline and team.

The timeline depends on the task and is agreed before work starts, not after. The calculator gives a timeline estimate too.

Yes. We run research, design the interface and build a design system that your own team can take into development.

Yes, and with other cities of Kazakhstan too. We work remotely with regular calls, updates and project documentation.

Yes. We first review the code and the current state of the product, then propose an improvement plan and join the process.

A short description of the task is enough. A technical specification is optional — we'll ask the clarifying questions ourselves.

The full cycle: analytics, UX/UI design, iOS, Android, web and backend development, testing, release and post-launch support.

Have an idea? Let's turn it into a working product.

We reply within one business day