flutter-router-decision
Skill1 starsChanged 27 days agoBSD-3-ClauseView on GitHub
Chooses Flutter routing, defaulting to go_router, with guidance on auth redirects, deep links and nested tabs. Use when starting routing on a new Flutter app or when someone claims go_router is in maintenance mode. Use before adding zenrouter, navigation_utils or auto_route to an app that already uses go_router.
In this repository52 other files it gives its agents.
- academic-research-assistantSkill
- answer-sheetSkill
- app-graphicsSkill
- app-landing-pageSkill
- app-screenshotsSkill
- break-uiSkill
- consumer-app-from-behaviorSkill
- cross-language-safetySkill
- dart-tool-scriptsSkill
- decision-sweepSkill
- engineering-diarySkill
- figma-review-loopSkill
- flutter-app-size-auditSkill
- flutter-async-at-the-edgeSkill
- flutter-async-cubit-safetySkill
- flutter-bloc-clean-architectureSkill
- flutter-clean-architecture-tddSkill
- flutter-cubit-smart-cachingSkill
- flutter-error-logging-conventionsSkill
- flutter-observability-instrumentationSkill
- flutter-paywall-and-review-timingSkill
- flutter-precommit-cleanupSkill
- flutter-runtime-safetySkill
- flutter-shorebird-otaSkill
- flutter-stream-architectureSkill
- flutter-strict-analysisSkill
- flutter-web-first-paintSkill
- forced-pivot-15-daySkill
- gplay-consoleSkill
- ios-distribution-feature-flagsSkill
- launch-readinessSkill
- launch-watchSkill
- locale-expert-reviewSkill
- market-pulseSkill
- mobile-ui-referenceSkill
- moscow-prioritizationSkill
- orchestrate-agentic-engineeringSkill
- parallel-agent-inboxSkill
- paywall-conversion-flowSkill
- paywall-transparencySkill
- proactive-crash-repair-loopSkill
- promise-auditSkill
- pr-preview-shippingSkill
- ship-first-dollar-appSkill
- slim-ios-simulator-fleetSkill
- spec-sql-harnessSkill
- store-launch-mastermindSkill
- sync-contextSkill
- task-blitzSkill
- techdebtSkill
- vendor-decisionSkill
- web-interface-reviewSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Check pub.dev, not Twitter.
- Distinctive: line 19
Leave go_router only with a concrete need:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter router decision
Check pub.dev, not Twitter. As of 2026-09-28: go_router 18.0.1, publisher flutter.dev, feature-complete = bugfix-stable, not abandoned. Changelog tracks Flutter 3.44.
Default
Stay on (or start with) go_router. Use Flutter's official declarative routing skill for bootstrap, deep links, and StatefulShellRoute.
Leave go_router only with a concrete need:
| Need | Choose |
| URL + deep links + nested tabs, standard app | go_router |
Type-safe RouteTarget + mixins, no codegen, Coordinator URI parse | zenrouter |
| Codegen typed routes on top of go_router | go_router + go_router_builder |
| "go_router is dead" rumor | do not migrate |
| navigation_utils | do not pick as default (nested nav still BETA) |
go_router 18 requires Flutter 3.44 / Dart 3.12. Don't bump the package without bumping the SDK.
Auth redirect
redirect: (context, state) {
final loggedIn = auth.currentUser != null;
final loggingIn = state.matchedLocation == '/login';
if (!loggedIn && !loggingIn) return '/login';
if (loggedIn && loggingIn) return '/';
return null;
},
redirectLimit: 5,Deep links and extra
extra is not in the URL. Don't put objects that must survive a web refresh or a cold-start deep link in extra. Put an id in the path and rehydrate from a repository.
Nested tabs
StatefulShellRoute.indexedStack + navigationShell.goBranch(index, initialLocation: index == current). Child paths omit the leading /.
Creating Futures inside route builders causes the Future to be recreated and refetched on every rebuild. Load in a ViewModel instead.
If (and only if) zenrouter Coordinator
Implement parseRouteFromUri, give every route RouteUnique.toUri(), use RouteGuard/RouteRedirect mixins, wire MaterialApp.router(routerConfig: coordinator). Imperative NavigationPath is enough when you do not need URLs.
Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

