flutter-patterns

Guide Flutter and Dart development with BLoC, Riverpod, and Freezed patterns.

2|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/atstaeff/ai-agents --skill flutter-patterns-atstaeff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-patterns
Source: https://github.com/atstaeff/ai-agents/tree/main/skills/flutter-patterns
Command: npx skills add https://github.com/atstaeff/ai-agents --skill flutter-patterns-atstaeff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and examples for implementing modern, production-grade patterns in Flutter and Dart applications, ensuring maintainability and scalability.

Core Features & Use Cases

  • Architectural Patterns: Demonstrates BLoC, Riverpod, and Use Case patterns for robust state management and business logic separation.
  • Code Quality: Emphasizes immutable data models with freezed and effective error handling with Either.
  • UI/UX: Includes examples for responsive layouts and adaptive dialogs.
  • Use Case: When developing a new Flutter feature, consult this Skill for best practices on structuring your code, managing state, and handling errors.

Quick Start

Apply the BLoC pattern to manage state for a user authentication flow.

Frequently Asked Questions about flutter-patterns

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

FAQPage Schema
What is the best way to structure a scalable Flutter application?

The best way to structure a scalable Flutter application is by using clean architecture, separating business logic with Use Cases, and implementing robust state management patterns like BLoC or Riverpod to ensure maintainability.

How do I manage state in Flutter using Riverpod or BLoC?

To manage state in Flutter, you can use BLoC for event-driven flows or Riverpod for reactive data binding. Both patterns separate business logic from the UI, enforcing production-grade standards and making your mobile application easier to test and maintain.

How do I handle immutable data models and errors in Dart?

To handle immutable data models and errors in Dart, use the `freezed` package to generate immutable classes and the `Either` type for effective error handling, ensuring robust and predictable state transitions without side effects.

Can I use clean architecture with Flutter for production apps?

Yes, you can use clean architecture with Flutter for production apps. It separates dependencies, enforces immutable data models with `freezed`, and isolates business logic into Use Cases, resulting in highly maintainable and scalable mobile applications.

Does this guidance cover responsive layouts and adaptive UI design in Flutter?

Yes, this guidance covers responsive layouts and adaptive dialogs for Flutter. It provides examples for building adaptive UI/UX components that adjust gracefully across different screen sizes and device contexts.

When should I use the BLoC pattern over Riverpod for Flutter state management?

You should use the BLoC pattern over Riverpod when you need strict event-driven state transitions and heavy separation of concerns, whereas Riverpod is often preferred for simpler reactive data binding and dependency injection in modern Dart applications.