Scaleup Infotech
Scaleup Infotech.
Back to Blog
Mobile Development9 min read

Navigation 2.0 in Flutter With go_router

Scaleup Infotech Team

Scaleup Infotech Team

Software & Marketing Agency

May 25, 2026
Fluttergo_routerNavigationDeep Links

Direct Answer

This guide gives a simple overview of navigation 2.0 in flutter with go_router. If you need help turning the idea into a website, app, or business system, the related Scaleup Infotech services are listed below.

The imperative Navigator.push falls apart once you need deep links, web URLs, or auth-based redirects. go_router gives Flutter a declarative, URL-first router that handles all of it.

Defining Routes

dart
final router = GoRouter(
  routes: [
    GoRoute(path: '/', builder: (_, __) => const HomeScreen()),
    GoRoute(
      path: '/product/:id',
      builder: (_, state) => ProductScreen(id: state.pathParameters['id']!),
    ),
  ],
);

Auth Redirects in One Place

dart
GoRouter(
  redirect: (context, state) {
    final loggedIn = authService.isLoggedIn;
    if (!loggedIn && state.uri.path != '/login') return '/login';
    return null; // no redirect
  },
  routes: [ /* ... */ ],
);

Navigating

dart
context.go('/product/42');      // replace
context.push('/settings');      // push onto the stack

Free Deep Links and Web URLs

Because routes are real paths, deep links from notifications and shareable web URLs work with zero extra code. StatefulShellRoute handles bottom-nav tab state too.

Relevant Scaleup Infotech Services

Share this article:

Keep Reading

Ready to implement these ideas?

Work With Scaleup Infotech

Free Website Check

Pages, speed, forms