configure-navigation

Centralize Flutter GoRouter configuration and route management in app_routes.dart and app_router.dart.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/andrelucassvt/CleanMacForDevsWeb --skill configure-navigation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: configure-navigation
Source: https://github.com/andrelucassvt/CleanMacForDevsWeb/tree/main/.agents/skills/configure-navigation
Command: npx skills add https://github.com/andrelucassvt/CleanMacForDevsWeb --skill configure-navigation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps Flutter teams prevent scattered navigation logic by centralizing GoRouter configuration, route constants, and navigation patterns, reducing bugs and improving consistency across the app.

Core Features & Use Cases

  • Centralizes route constants in app_routes.dart and GoRouter configuration in app_router.dart for a single source of truth.
  • Supports GoRouter features such as path parameters, nested routes, redirects, guards, and ShellRoute layouts to handle complex flows.
  • Encourages navigation from the view layer via context.push, context.go, and context.replace, with coordination through BlocListener when needed.
  • Facilitates maintenance and scaling as the app grows, including deep links and guard-driven redirects.

Quick Start

Define your routes in app_routes.dart, configure GoRouter in app_router.dart, and perform navigation from the view using context.push, context.go, or context.replace.

Frequently Asked Questions about configure-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize Flutter GoRouter configuration to prevent scattered navigation logic?

Centralize Flutter GoRouter configuration by defining route constants in app_routes.dart and router setup in app_router.dart. This creates a single source of truth for navigation, reducing bugs and improving consistency across multiple features.

How do I handle deep linking and guard-based access control in Flutter?

Handle deep linking and guard-based access control in Flutter by configuring GoRouter redirects and nested routes within a centralized app_router.dart file. This enforces scalable access management across your app's features.

Can I use ShellRoute layouts for complex navigation flows in Flutter?

Yes, you can use ShellRoute layouts in Flutter to handle complex navigation flows. The centralized GoRouter configuration supports ShellRoutes, path parameters, and nested routes to manage consistent layouts across multiple views.

What is the best way to trigger Flutter navigation from the view layer?

The best way to trigger Flutter navigation from the view layer is using context.push, context.go, or context.replace. Coordinate navigation from views rather than Cubits, using BlocListener when state-driven coordination is needed.

Does this GoRouter setup work for large Flutter apps with multiple features?

Yes, this GoRouter setup works for large Flutter apps by enforcing a scalable project structure. Centralizing route constants and navigation patterns facilitates maintenance as the app grows, ensuring consistent routing across features.

Why should I avoid managing Flutter navigation logic inside Cubits?

You should avoid managing Flutter navigation inside Cubits to prevent scattered logic and coupling. Centralizing GoRouter configuration and guiding navigation from the view layer reduces bugs and maintains a scalable structure.