flutter-setup-declarative-routing

Configure declarative routing and deep linking in Flutter apps using go_router.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aashahin/ai-skills --skill flutter-setup-declarative-routing-aashahin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flutter-setup-declarative-routing
Source: https://github.com/aashahin/ai-skills/tree/main/flutter-setup-declarative-routing
Command: npx skills add https://github.com/aashahin/ai-skills --skill flutter-setup-declarative-routing-aashahin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go_router.

What problem does it solve? Setting up URL-based navigation, deep linking, and nested navigation in Flutter requires coordinating Dart router configuration with platform-specific Android and iOS settings, which is error-prone when done manually. ## Core Features & Use Cases - Declarative Router Setup: Initialize a GoRouter with route trees, path parameters, redirects, and error handling bound to MaterialApp.router. - Platform Deep Linking: Configure Android App Links (Manifest intent filters and assetlinks.json) and iOS Universal Links (entitlements and apple-app-site-association files) with ADB and xcrun validation commands. - Nested Navigation: Implement StatefulShellRoute with persistent bottom navigation bars that preserve per-branch state. - Use Case: You are building a Flutter web and mobile app that must open specific screens from shared URLs like https://yourdomain.com/details/123, with clean URLs and a stateful bottom navigation bar. ## Quick Start Set up go_router in my Flutter app with deep linking for Android and iOS and a bottom navigation shell.

Frequently Asked Questions about flutter-setup-declarative-routing

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

FAQPage Schema
How do I set up go_router in a Flutter app?▼

Add go_router with flutter pub add, define a top-level GoRouter instance with your route tree, and pass it to MaterialApp.router via the routerConfig parameter. Call usePathUrlStrategy in main to remove the hash fragment from web URLs.

How to configure deep linking in Flutter for Android and iOS?▼

For Android, add an intent filter with autoVerify in AndroidManifest.xml and host an assetlinks.json file at your domain. For iOS, enable FlutterDeepLinkingEnabled in Info.plist, add associated domains to Runner.entitlements, and host an apple-app-site-association file.

How do I test Flutter deep links on Android and iOS?▼

On Android, use adb shell with am start and a VIEW intent targeting your URL and package name. On iOS, run xcrun simctl openurl booted followed by the URL on a booted simulator.

Does go_router support bottom navigation with preserved state?▼

Yes, StatefulShellRoute.indexedStack wraps child routes in a persistent shell such as a bottom navigation bar. Each StatefulShellBranch maintains its own navigation stack and state when switching tabs.

Why does my Flutter deep link conflict with a third-party plugin?▼

Flutter's built-in deep link handler can conflict with plugins like app_links. Set FlutterDeepLinkingEnabled to NO in Info.plist when using a third-party deep linking plugin to prevent duplicate handling.