What problem does it solve?
This skill enforces a clean, layered architecture for Flutter projects, separating business logic from UI to improve testability and maintainability. It prescribes a standard directory layout to avoid tangled code and makes onboarding new features predictable.
Core Features & Use Cases
- Clear Layer Separation: Models, services, providers, and UI live in distinct folders to prevent cross-contamination.
- Testability & Mockability: Providers act as the bridge between UI and services, enabling isolated unit tests.
- Incremental Adoption: Start with a small feature and progressively migrate existing code to the architecture.
- Use Case: Create a new screen + a corresponding provider and service, then wire them through Riverpod widgets.
Quick Start
Create lib structure as described: models/, services/, providers/, screens/, widgets/ and main.dart as entry point. Implement a sample feature by adding a model, a service, a provider, and a screen that consumes the provider. Run the app to verify separation of concerns.