Poorgramer-Zack/dart-expert-skills / skills/archived/flutter-routing
flutter-routing
VerifiedDeclarative routing and navigation for Flutter using GoRouter and AutoRoute. Use when implementing navigation guards, nested routes, type-safe routing, or deep link handling.
Flutter Routing & Navigation Architecture
Goal
Establish a robust, scalable, and declarative navigation system for Flutter applications. This skill ensures developers can correctly choose and implement industry-standard routing solutions—GoRouter for official declarative support or AutoRoute for type-safe code generation—while maintaining clean URL handling, deep-link support, and complex nested navigation architectures.
Process
🚀 High-Level Workflow
Navigating routing decisions requires understanding the project's scale and requirements for type safety versus boilerplate.
Phase 1: Choosing Your Framework
Determine the best fit for your team's workflow:
- GoRouter: The official, widely-supported declarative solution. Best for standard web-compatible routing and ease of external tool integration (like Sentry).
- AutoRoute: Compile-time type-safe routing. Best for massive apps where manual URL string management becomes a liability and strong type guarantees are prioritized.
Phase 2: Implementation Details
Consume these specialized architectural reference resources for deep implementation guidance:
- GoRouter & Persistent Navigation - Official declarative patterns,
StatefulShellRoutefor tabs, and redirection guards. - AutoRoute & Type-Safe Navigation - Code generation patterns (
v11.x),@RoutePageannotations, and global guards.
📚 Documentation Library
Refer to these detailed guides to implement specific routing features:
Constraints
- Declarative First: Prohibit legacy imperative
Navigator.pushpatterns in new architectures. All navigation should be addressable via URLs or generated Route objects. - Architecture Consistency: Never mix GoRouter and AutoRoute in the same application module.
- Web Compatibility: Ensure all routing logic maintains browser URL bar synchronization and back-button behavior integrity.
- Safe Parameters: Never pass massive Object instances directly through URL parameters; pass unique identifiers and fetch data at the target destination.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |