
Flutter Setup Declarative Routing
Skip the hand-rolled Navigator 2.0 boilerplate and use `go_router`. This skill walks through the full setup: adding the package, calling `usePathUrlStrategy()` to drop the `#` from web URLs, defining a route tree with path parameters like `details/:id`, and binding it to `MaterialApp.router`. The more useful parts are the platform sections, which cover the AndroidManifest intent filter plus `assetlinks.json` and the iOS entitlements plus `apple-app-site-association`, along with `adb` and `xcrun simctl` commands to test deep links without shipping. It also shows `StatefulShellRoute.indexedStack` for bottom-nav tabs that keep their state. Reach for it when you need real deep links or browser history on web. For a simple app with a few screens and no URL requirements, it's more machinery than you need.
- skills.sh installs
- 39.7K
- GitHub stars
- 3.2K
- last updated
- Oct 26, 2026
Install
$ npx -y skills add flutter/agent-plugins --skill flutter-setup-declarative-routing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Implementing Routing and Deep Linking
Contents
- Core Concepts
- Workflow: Initializing the Application and Router
- Workflow: Configuring Platform Deep Linking
- Workflow: Implementing Nested Navigation
- Examples
Core Concepts
Use the go_router package for declarative routing in Flutter. It provides a robust API for complex routing scenarios, deep linking, and nested navigation.
- GoRouter: The central configuration object defining the application's route tree.
- GoRoute: A standard route mapping a URL path to a Flutter screen.
- ShellRoute / StatefulShellRoute: Wraps child routes in a persistent UI shell (e.g., a
BottomNavigationBar).StatefulShellRoutemaintains the state of parallel navigation branches. - Path URL Strategy: Removes the default
#fragment from web URLs, essential for clean deep linking across platforms.
Workflow: Initializing the Application and Router
Sponsors
Details
- Repository
- github.com/flutter/agent-plugins
- Categories
- AI & Agent Building, Automation & Workflows, Mobile Development
- First seen
- Oct 26, 2026
More from flutter/agent-plugins
All 10- Flutter Implement Json Serialization39.4K
- Flutter Add Widget Preview38.7K
- Flutter Setup Localization38.7K
- Flutter Use Http Package37.9K
- Flutter Apply Architecture Best Practices45.5K
- Flutter Build Responsive Layout45.1K
- Flutter Fix Layout Issues42.2K
- Flutter Add Widget Test41.4K
- Flutter Add Integration Test40.2K