
Dart Flutter Patterns
- 4.5k installs
- 238k repo stars
- Updated August 5, 2026
- affaan-m/everything-claude-code
dart-flutter-patterns is an agent skill for apply production dart and flutter patterns for null safety, state management, gorouter, dio, and clean architecture.
About
The dart-flutter-patterns skill supplies production-ready Dart and Flutter idioms for null safety, immutable state, async composition, widget architecture, and popular state management choices. Use it when starting features needing BLoC, Riverpod, or Provider patterns, reviewing null-safe Dart, wiring GoRouter navigation, implementing Dio networking, or testing widgets and cubits. Patterns cover avoiding bang operators, preferring sealed AsyncState variants, concurrent Future.wait usage, and safe BuildContext after await. Widget guidance extracts classes instead of methods, propagates const, and scopes rebuilds narrowly. State sections document BLoC events, Riverpod notifiers, and derived providers. Navigation examples wire GoRouter refreshListenable auth guards with redirect rules. Networking shows Dio interceptors and one-time token refresh retry guards. Error handling covers global capture, ErrorWidget.builder, and crash reporting hooks. Testing notes include bloc_test units and ProviderScope widget overrides with fakes over mocks.
- Sealed AsyncState variants prevent impossible loading success failure combinations.
- GoRouter refreshListenable auth redirects gate login routes reactively.
- Dio client patterns with interceptors and guarded token refresh retries.
- Widget architecture prefers class extraction, const propagation, scoped rebuilds.
- Testing guidance for bloc_test units and ProviderScope widget overrides.
Dart Flutter Patterns by the numbers
- 4,507 all-time installs (skills.sh)
- +227 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #36 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
dart-flutter-patterns capabilities & compatibility
- Capabilities
- sealed asyncstate variants prevent impossible lo · gorouter refreshlistenable auth redirects gate l · dio client patterns with interceptors and guarde · widget architecture prefers class extraction, co · testing guidance for bloc_test units and provide
- Use cases
- frontend · api development
What dart-flutter-patterns says it does
9. **テスト** — ユニット(BLoC test)、ウィジェット(ProviderScopeオーバーライド)、モック上のフェイク
final class Loading<T> extends AsyncState<T> {}
final class Success<T> extends AsyncState<T> { final T data; const Success(this.data); }
npx skills add https://github.com/affaan-m/everything-claude-code --skill dart-flutter-patternsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4.5k |
|---|---|
| repo stars | ★ 238k |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 5, 2026 |
| Repository | affaan-m/everything-claude-code ↗ |
How do I apply production dart and flutter patterns for null safety, state management, gorouter, dio, and clean architecture with documented agent guidance?
Apply production Dart and Flutter patterns for null safety, state management, GoRouter, Dio, and clean architecture.
Who is it for?
Developers who need mobile development help during build work.
Skip if: Skip when the task falls outside Mobile Development scope described in SKILL.md.
When should I use this skill?
Apply production Dart and Flutter patterns for null safety, state management, GoRouter, Dio, and clean architecture.
What you get
Completed mobile development workflow aligned with SKILL.md steps and validation.
- Flutter widget patterns
- State management setup
- Typed API client modules
By the numbers
- Sealed AsyncState variants prevent impossible loading success failure combinations.
- GoRouter refreshListenable auth redirects gate login routes reactively.
- Dio client patterns with interceptors and guarded token refresh retries.
Files
Dart/Flutterパターン
使用時期
次の場合にこのスキルを使用:
- 新しいFlutter機能を開始し、状態管理、ナビゲーション、またはデータアクセスのイディオマティックパターンが必要
- Dartコードのレビューまたは作成とnull安全性、シール型、非同期構成のガイダンスが必要
- 新しいFlutterプロジェクトをセットアップしBLoC、Riverpod、またはProviderのうち選択
- 安全なHTTPクライアント、WebView統合、ローカルストレージを実装
- FlutterウィジェットEt、Cubit、またはRiverpodプロバイダーのテストを作成
- GoRouterを認証ガードでワイヤリング
動作方法
このスキルは、懸念事項で整理されたコピーペーストの準備ができたDart/Flutterコードパターンを提供: 1. Null安全性 — !を避ける、?./??/パターンマッチングを好む 2. 不変状態 — シール型、freezed、copyWith 3. 非同期構成 — 並行Future.wait、await後の安全なBuildContext 4. ウィジェットアーキテクチャ — クラスに抽出(メソッドではなく)、const伝播、スコープ付きリビルド 5. 状態管理 — BLoC/Cubityベント、Riverpodノーティファイアおよび派生プロバイダー 6. ナビゲーション — refreshListenable経由の反応型認証ガード付きGoRouter 7. ネットワーキング — インターセプタ付きDio、ワンタイム再試行ガード付きトークンリフレッシュ 8. エラーハンドリング — グローバルキャプチャ、ErrorWidget.builder、crashlyticsワイヤリング 9. テスト — ユニット(BLoC test)、ウィジェット(ProviderScopeオーバーライド)、モック上のフェイク
例
// シール状態 — 不可能な状態を防止
sealed class AsyncState<T> {}
final class Loading<T> extends AsyncState<T> {}
final class Success<T> extends AsyncState<T> { final T data; const Success(this.data); }
final class Failure<T> extends AsyncState<T> { final Object error; const Failure(this.error); }
// 反応型認証リダイレクト付きGoRouter
final router = GoRouter(
refreshListenable: GoRouterRefreshStream(authCubit.stream),
redirect: (context, state) {
final authed = context.read<AuthCubit>().state is AuthAuthenticated;
if (!authed && !state.matchedLocation.startsWith('/login')) return '/login';
return null;
},
routes: [...],
);詳細については、ドキュメントを参照してください。
Related skills
Forks & variants (1)
Dart Flutter Patterns has 1 known copy in the catalog totaling 1.4k installs. They canonicalize to this original listing.
- affaan-m - 1.4k installs
How it compares
dart-flutter-patterns is an agent skill for apply production dart and flutter patterns for null safety, state management, gorouter, dio, and clean architecture, not a generic alternative.
FAQ
Who is dart-flutter-patterns for?
Developers using Mobile Development workflows with agent-guided SKILL.md steps.
When should I use dart-flutter-patterns?
Apply production Dart and Flutter patterns for null safety, state management, GoRouter, Dio, and clean architecture.
Is dart-flutter-patterns safe to install?
Review the Security Audits panel on this page before installing in production.