SKILL

flutter-architecture

Current (2026) Flutter app architecture from the Flutter team's official guide, Very Good Ventures and LeanCode - UI layer (View + ViewModel/Cubit/Notifier) and data layer (Repository + Service), feature folders, dependency injection, Result/Command patterns, networking and JSON models, go_router, monorepos with pub workspaces, day-one project setup, scaling teams, legacy refactoring. Use this whenever creating a new Flutter project or feature, deciding folder structure, adding a repository/API/service layer, choosing packages, reviewing Flutter code for maintainability, or scaling a Flutter team - even if the user only asks "where should this file go".

原文 · 译文尚未补齐

适用对象:移动应用开发。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Flutter architecture
  • 1. The layers
  • 2. Scale the structure to the project
  • 3. Data, networking, persistence
  • 4. App-level decisions
  • 5. Day-one setup checklist (do these before feature work)
  • 6. Scaling teams and legacy (LeanCode + VGV experience)
  • Sources

Verified 2026-09-25 against docs.flutter.dev/app-architecture (Flutter 3.47), engineering.verygood.ventures, and pub.dev. For Dart syntax and widget code style, see the flutter-dart-style skill. For state libraries, see flutter-state-management. Core rule (Flutter team, "strongly recommend"): separate the UI layer from the data layer, keep widgets dumb, and let data flow one way. Everything else is scaled to the project's size. Service: wraps exactly one external source (REST client, DB, platform plugin, SharedPreferences). No business logic. Returns raw/API models. Repository: the source of truth for one kind of data (UserRepository, BookingRepository). It combines services, caches, retries, maps API models to domain models, and exposes Future > or Stream . No Flutter imports. Define it as an abstract class (officially "strongly recommend"), so tests use fakes and dev/staging use other implementations. ViewModel / Cubit / Notifier: one per screen or feature. Turns repository data into UI state and exposes actions (Commands/methods). No BuildContext, no widgets. View: layout, simple ifs, animation, routing. No business logic. Domain layer / use-cases: conditional. Add them only whe

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
abugeek/flutter-skills
源文件
.claude/skills/flutter-architecture/SKILL.md
固定版本
458377635834ad1cff2c4871ac0725a5ef4bcd4f
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:abugeek/flutter-skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-10T09:01:53.906Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。