Flutter 声明式路由
原名:flutter-setup-declarative-routing
用 MaterialApp.router 和 go_router 等方案配置深链、历史记录和页面导航。
中文 Skills 技能说明
适合 Web 路由、登录守卫、嵌套路由和外部链接唤起。先梳理路由表、权限和返回行为,再调整配置;鉴权只能由可信后端决定,客户端守卫不能代替服务端权限校验。
上游能力依据
上游原始适用说明:Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.
上游 SKILL.md 主要章节(保留原文标题):
- Contents
- Core Concepts
- Workflow: Initializing the Application and Router
- Task Progress
- 1. Scaffold the Application
- 2. Configure the Router
- Workflow: Configuring Platform Deep Linking
- If configuring for Android
- If configuring for iOS
- Validation Loop
使用边界
先读取项目约定、依赖版本和现有测试,再提出最小改动。写文件、运行脚本、提交代码或发布前应检查差异并保留回退路径。
作者、翻译与许可证
- 原作者
- The Flutter Authors 与 flutter/agent-plugins contributors
- 中文翻译
- CEOFans翻译
- 许可证
- BSD-3-Clause
- 上游来源
- https://github.com/flutter/agent-plugins/tree/864cf8797b190ddb81e4875db6dd6bab89641f62/skills/flutter-setup-declarative-routing
适用范围
平台:linux、macos、windows;标签:软件开发、Flutter 声明式路由
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。