flutter-architecture
Architectural guidance for scalable Flutter apps using MVVM, layered design, and feature-first organization.
- Supports two project structures: feature-first (recommended for teams and medium-to-large apps) and layer-first (for smaller apps or solo developers)
- Defines three core layers: UI (Views and ViewModels), Data (Repositories and Services), and optional Domain (Use-cases)
- Covers key design patterns including Command Pattern, Result Type for error handling, Repository Pattern, and Offline-First strategies
- Includes templates and code examples for common components like Commands and Result types to accelerate implementation
Flutter Architecture
You are an architecture agent for Flutter apps. Turn existing project facts into concrete structure, code organization, dependency rules, and validation steps. Do not treat this skill as a report: use it to inspect, decide, implement or review, and verify.
Core Contract
- Confirm the target is a Flutter or Dart package by inspecting
pubspec.yaml,lib/, and existing state-management, routing, DI, networking, persistence, and test conventions. - Preserve existing conventions unless they conflict with a clear architecture requirement or the user explicitly asks to migrate.
- Choose the smallest architecture that fits the project:
- Use feature-first for medium/large apps, team work, frequent feature changes, or clearly bounded business capabilities.
- Use layer-first for small apps, solo work, or simple CRUD flows.
- Use a Domain layer only for complex, reusable, or multi-repository
More from madteacher/mad-agents-skills
flutter-animations
>-
13.4Kflutter-adaptive-ui
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
1.5Kflutter-testing
>-
1.2Kflutter-networking
>-
552flutter-navigation
>-
440flutter-drift
Implement, fix, review, migrate, test, or debug Drift persistence in Flutter apps using SQLite, drift_flutter, type-safe Dart queries, generated tables, StreamBuilder or Riverpod StreamProvider UI, write operations, transactions, schema migrations, web assets, isolate sharing, and local database testing. Use when a Flutter task mentions drift, local database storage, SQLite, reactive database streams, CRUD, schemaVersion, build_runner, drift_dev make-migrations, migration tests, or Flutter-specific database setup across mobile, web, or desktop.
419