flutter-app-architecture

Featured

Use when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).

AI & Automation 619 stars 60 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
93
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Flutter App Architecture Skill This skill defines how to structure Flutter applications using layered architecture, proper data flow, and MVVM patterns for maintainability and testability. ## When to Use Use this skill when: * Scaffolding a new Flutter project with layered architecture. * Creating or refactoring View Models, Repositories, or Services. * Wiring dependency injection between architectural components. * Implementing unidirectional data flow across layers. * Adding a Domain (Logic) Layer for complex business logic or shared use cases. --- ## 1. Layer Structure Separate every app into a **UI Layer** and a **Data Layer**. Add a **Logic (Domain) Layer** only for complex apps. ``` ┌──────────────────────────────────────────────────────────────┐ │ UI Layer │ Views + ViewModels │ ├──────────────────────────────────────────────────────────────┤ │ Logic Layer │ Use Cases / Interactors (optional) │ ├──────────────────────────────────────────────────────────────┤ │ Data Layer │ Repositories + Services │ └──────────────────────────────────────────────────────────────┘ ``` **Rules:** - Only adjacent layers may communicate. The UI layer must never access a Service directly. - Data changes always happen in the Data layer (SSOT = Repository). No mutation in UI or Logic layers. - Follow unidirectional data flow: state flows **down** (Data → UI), events flow **up** (UI → Data). --- ## 2. Component Res...

Details

Author
evanca
Repository
evanca/flutter-ai-rules
Created
1 years ago
Last Updated
today
Language
Shell
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category