What does this skill do?

The Dart and Flutter Patterns Skill provides idiomatic, production-ready code patterns in Dart and Flutter. It addresses architectural needs, zero-security risks, state management, navigation, and API consumption, ensuring decoupled and scalable components.

Government Administration
Configure BLoC/Cubit or Riverpod in a reactive and decoupled way using sealed or frozen classes.
Zero Security and Types
Apply zero-safety patterns, sealed types, and asynchronous composition in your Dart code.
Navigation with GoRouter
Implements reactive navigation with authentication guards and automatic redirects.
Using APIs with Dio
Configure secure HTTP clients with interceptors and token refresh handling.

Usage examples

🧩 Immutable state
Write an immutable state for the login using sealed classes and pattern matching in Dart.
🧭 Reactive Navigation
Configure GoRouter with automatic redirects based on my AuthCubit authentication status.
🛡️ Asynchronous Security
Take a look at this StatefulWidget and add the `mounted` guard after the `await` statements.
🌐 HTTP Client
Create an HTTP client with Dio that automatically handles interceptors and token refresh.

Features

Widget Architecture Isolate rebuilds by extracting components and using `const` propagation.
BLoC and Riverpod Patterns A guide to choosing and configuring the most appropriate state management solution for your project.
Type Safety Extensive use of sealed classes and pattern matching to prevent impossible states.
Safe Browsing Implementing reactive authentication guards with GoRouter.

Frequently asked questions

It provides patterns for both BLoC/Cubit and Riverpod, helping you choose the one that's right for you.
Yes, it integrates Dio configuration with interceptors and token refresh handling.
When starting a new Flutter feature or project, it's a good idea to choose the underlying architecture.
Dart and Flutter Templates — Production-Ready Code with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.