首页龙虾技能列表 › Flutter Schema — Flutter 架构

Flutter Schema — Flutter 架构

v2.0.0

Flutter 架构工具。

0· 195·0 当前·0 累计
by @symboy·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/11
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
This is a self-contained Flutter GetX scaffolding/instruction skill that only generates local Dart files and does not request credentials or perform network activity.
评估建议
This skill is a local scaffolding helper: it generates Flutter GetX page files under your project's lib directory and reads pubspec.yaml to fill package imports. Before using it: (1) run it from your project (or copy scripts/validate.py into your project) so the script can locate pubspec.yaml; (2) back up or review changes before committing, since it will create files; (3) ensure the target directory you pass is inside your project's lib folder (the script enforces this but be careful with symli...
详细分析 ▾
用途与能力
Name/description (Flutter GetX scaffold & architecture guidance) match the included artifacts: documentation and a small Python script that generates GetX page files. The requested capabilities (file generation under lib/modules) are appropriate for the stated purpose.
指令范围
SKILL.md instructs running the included Python script to create page scaffolding. The script only reads pubspec.yaml (to get the package name) and writes four Dart files under lib (with checks to prevent path traversal). Minor ambiguity: SKILL.md suggests running the script from '~/flutter-schema/scripts/validate.py' while the repository provides scripts/validate.py; the user will need to ensure the script is placed/run in their project environment. No instructions reference external network endpoints or unrelated system files.
安装机制
No install spec is provided (instruction-only plus a small helper script). Nothing is downloaded or executed from remote URLs; there are no package installs declared.
凭证需求
The skill requests no environment variables or credentials. The script reads only local project files (pubspec.yaml) which is reasonable for generating Dart package imports.
持久化与权限
always is false and the skill does not request persistent or cross-skill privileges. It only writes files within the project's lib directory and does not modify other skills or system-wide settings.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv2.0.02026/3/11

Initial release. - Provides a three-layer vertical architecture guideline for Flutter using GetX: shared, core, modules. - Defines recommended directory structure, naming conventions, and dependency rules. - Supports scaffold-based directory and module creation. - Includes guidance for module and page generation using helper scripts. - Suitable for new module creation, directory planning, and code review.

● 无害

安装命令 点击复制

官方npx clawhub@latest install flutter-schema
镜像加速npx clawhub@latest install flutter-schema --registry https://cn.clawhub-mirror.com

技能文档

架构概览

纵向分层(自上而下单向依赖,modules 依赖 core 和 shared):

shared(底)← core ← modules(顶)

模块内 GetX 结构

Binding(注入) + View ← Logic → State

层级速查

层级职责
core配置、路由、服务、工具、通用 UI 组件
shared业务基类、存储、网络、可复用能力
modules业务功能实现,按功能拆模块,模块间走路由

模块目录模板

{module}/
├── {feature}/                 # 子功能(可选)
│   ├── xxx_binding.dart
│   ├── xxx_logic.dart
│   ├── xxx_state.dart
│   ├── xxx_view.dart
│   ├── model/
│   └── view/
├── binding/
├── model/
├── view/
├── db/                        # 本地数据(可选)
└── upload/                    # 上传(可选)

命名约定

  • binding / logic / state / 视图:xxx_binding.dartXxxBinding
  • logic 继承项目内 BaseController 基类
  • 视图文件以 _view 结尾,类名以 Page视图 结尾
  • 避免使用 widget 作为文件或类名后缀

依赖约束

  • 仅允许上层依赖下层
  • 同级模块不互相 导入,通过路由(获取.toNamed)通信
  • Logic 不持有 BuildContext、不直接操作 UI

Scaffold 能力

用户要求创建目录搭建架构新建模块时:

全量:创建 core/配置、constants、导航、utils、services、widgets;shared/data、domain;modules/{name}

增量:在 modules 下新建 {module_name}/,可用 验证.py 生成页面骨架

模块名使用小写下划线(如 order_list、user_profile)。

页面生成

  • 普通页:python ~/flutter-schema/scripts/验证.py [dir]

完整说明见 schema.md

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务