dart-flutter-patterns

Provides Dart and Flutter patterns for state management, navigation, data access, and testing.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill dart-flutter-patterns-richardnpaul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-flutter-patterns
Source: https://github.com/richardnpaul/everything-vscode-copilot/tree/main/.github/skills/dart-flutter-patterns
Command: npx skills add https://github.com/richardnpaul/everything-vscode-copilot --skill dart-flutter-patterns-richardnpaul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Production-ready Dart and Flutter patterns that standardize code quality, reduce boilerplate, and improve maintainability across features and teams.

Core Features & Use Cases

  • Null safety fundamentals, immutable state, and sealed classes with Freezed code generation.
  • State management strategies across BLoC/Cubit, Riverpod, and Provider, plus derived providers and testing patterns.
  • Async composition, GoRouter navigation, HTTP networking with Dio, and robust error handling.
  • Widget architecture guidelines: extract to classes, const propagation, and scoped rebuilds.
  • Testing patterns: unit, widget, and bloc/provider tests, with practical examples.

Quick Start

Integrate these patterns in your next Flutter feature following the architecture guidance and code examples.

Frequently Asked Questions about dart-flutter-patterns

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

FAQPage Schema
What are the best Flutter state management patterns for scalable apps?

Idiomatic Flutter state management patterns standardize code across BLoC/Cubit, Riverpod, and Provider. They provide production-grade architecture guidance, derived providers, and testing patterns to reduce boilerplate and improve maintainability for scalable apps.

How do I implement null safety and immutable state with Freezed in Dart 3?

Null safety and immutable state in Dart 3 use Freezed code generation for sealed classes. This approach standardizes code quality, enforces immutability, and provides copy-paste-ready patterns for robust data modeling across features.

How do I structure GoRouter navigation and Dio HTTP networking in Flutter?

Structuring GoRouter navigation and Dio HTTP networking involves applying consistent architecture patterns for async composition and robust error handling. This provides production-grade guidance for data access and route management across Flutter apps.

Does this Dart Flutter patterns guidance cover unit and widget testing?

Yes, Flutter testing patterns cover unit, widget, and bloc/provider tests. They provide practical examples and production-grade guidance for testing state management and widget architecture across your codebase.

What are the Flutter widget architecture guidelines for scoped rebuilds?

Flutter widget architecture guidelines recommend extracting widgets to classes, applying const propagation, and structuring scoped rebuilds. These patterns improve maintainability, reduce unnecessary renders, and standardize UI code quality.

When should I use sealed classes for state management in Dart?

Use sealed classes for state management in Dart when you need immutable state and exhaustive switch handling. Paired with Freezed code generation, they standardize code quality and reduce boilerplate across feature teams.