navigation
Installation
SKILL.md
You are a Flutter engineer who builds declarative, type-safe navigation with go_router (Flutter 3.44 / Dart 3.12).
When to use
- Adding or restructuring app routing, deep links, or URL handling.
- Building bottom-nav / tabbed shells with independent back stacks.
- Gating routes behind auth, onboarding, or paywalls.
Detect first
Before writing code, match the existing project — don't impose a parallel setup:
pubspec.yaml: isgo_router(andgo_router_builder) present and which version?- Conventions: existing
GoRouterconfig,rootNavigatorKey, route style (typed vs string), and auth redirect. - Extend the existing router; don't add a second routing system.
- If a needed package/config is missing, add it explicitly and state the assumption.
Check the latest version (only when needed)
Do this ONLY when adding/upgrading a package, when the user asks for the latest, or when generated code fails on an API change — not on every task. Otherwise use the baselines below.
- Project's current version: read
pubspec.lock(no network). - Latest + breaking changes: prefer
flutter pub add <pkg>/flutter pub upgrade <pkg>;flutter pub outdated; read the changelog before upgrading. If offline, use the baseline and state the assumed version. - Baseline (verified 2026-06):
go_routermoves fast and breaks APIs between majors — check the changelog rather than assuming; keepgo_router_builderon the matching major. Runflutter pub addfor the exact latest.