flutter-patterns

Organize Flutter projects with Clean Architecture and state-management patterns.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill flutter-patterns-rogeriosobrinho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-patterns
Source: https://github.com/RogerioSobrinho/codeme-copilot/tree/main/skills/flutter-patterns
Command: npx skills add https://github.com/RogerioSobrinho/codeme-copilot --skill flutter-patterns-rogeriosobrinho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter apps often suffer from tangled codebases as features grow. This skill provides a clear, scalable pattern approach (Clean Architecture, BLoC, Riverpod, GoRouter) to improve maintainability, testability, and developer velocity.

Core Features & Use Cases

  • Clear layered architecture with core, features, domain, and presentation layers for scalable Flutter projects.
  • Flexible state management with BLoC/Cubit and Riverpod, enabling robust event-based and provider-based patterns.
  • Effective navigation and data handling using GoRouter and Dio, with local persistence options via Hive or Isar.
  • Real-world use case: implement an Orders feature with remote and local data sources, repositories, and presentation layers.

Quick Start

Initialize a Flutter project with Clean Architecture scaffolding and apply BLoC or Riverpod for state management.

Frequently Asked Questions about flutter-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Flutter app with Clean Architecture and BLoC?

Structure a Flutter app with Clean Architecture by organizing code into core, features, domain, and presentation layers. Use BLoC or Cubit for event-based state management, ensuring separation of concerns and testability across layers.

Can I use Riverpod instead of BLoC for state management in Flutter Clean Architecture?

Yes, you can use Riverpod instead of BLoC. The pattern supports flexible state management, enabling robust provider-based patterns alongside Clean Architecture layers for scalable Flutter projects.

What is the best way to organize Flutter navigation and HTTP requests?

Organize Flutter navigation and HTTP requests using GoRouter for routing and Dio for HTTP handling. This combination enforces architecture best practices and integrates cleanly within the presentation and data layers.

Does this Flutter pattern support local persistence with Hive or Isar?

Yes, this Flutter pattern supports local persistence with Hive or Isar. It integrates these local data sources with remote sources via repositories to enable real-world features like orders and authentication.

How do I implement an Orders feature with remote and local data sources in Flutter?

Implement an Orders feature by combining remote and local data sources through a repository pattern. This approach fits within the domain and data layers, handling persistence via Hive or Isar and HTTP via Dio.

When should I use Clean Architecture in my Flutter project?

Use Clean Architecture in Flutter when your codebase grows tangled and needs maintainability. It enforces error handling and testability across layers, improving developer velocity as features scale up.