affaan-m avatar

Dart Flutter Patterns

This is a comprehensive reference for writing production Flutter code the right way. It covers the fundamentals that trip up most teams: null safety patterns that avoid the bang operator, sealed classes for state hierarchies, proper async composition with Future.wait, and the critical mounted check after await. The state management section gives you working examples for BLoC, Riverpod, and Provider instead of making you choose blindly. GoRouter setup includes the refreshListenable pattern for auth guards, Dio examples show token refresh with retry logic, and the testing guidance favors fakes over mocks. The widget architecture advice is spot on: extract to classes not methods, propagate const everywhere. If you're past the tutorial phase and need to see how the pieces actually fit together in a real codebase, this fills that gap.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
6
skills.sh installs
3.9K
GitHub stars
229.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add affaan-m/everything-claude-code --skill dart-flutter-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Dart/Flutter Patterns

When to Use

Use this skill when:

  • Starting a new Flutter feature and need idiomatic patterns for state management, navigation, or data access
  • Reviewing or writing Dart code and need guidance on null safety, sealed types, or async composition
  • Setting up a new Flutter project and choosing between BLoC, Riverpod, or Provider
  • Implementing secure HTTP clients, WebView integration, or local storage
  • Writing tests for Flutter widgets, Cubits, or Riverpod providers
  • Wiring up GoRouter with authentication guards

How It Works

Sponsors

Details

Repository
github.com/affaan-m/everything-claude-code
Category
Mobile Development
First seen
Apr 16, 2026

More from affaan-m/everything-claude-code

All 256
1dotnet avatarmaui-collectionviewdotnet/skillsGuidance for implementing CollectionView in .NET MAUI apps — data display, layouts (list & grid), selection, grouping, scrolling, empty views, templates, increm3.9Kskills.sh installs
2dotnet avatarmaui-shell-navigationdotnet/skillsGuide for implementing Shell-based navigation in .NET MAUI apps. Covers AppShell setup, visual hierarchy (FlyoutItem, TabBar, Tab, ShellContent), URI-based navi3.9Kskills.sh installs
3dpearson2699 avatarcore-bluetoothdpearson2699/swift-ios-skillsBuild direct Bluetooth Low Energy workflows with Core Bluetooth. Use when implementing BLE central or peripheral GATT communication, scanning or connecting with3.9Kskills.sh installs
4dpearson2699 avatarcore-motiondpearson2699/swift-ios-skillsAccess Core Motion accelerometer, gyroscope, magnetometer, device-motion, pedometer, activity-recognition, altitude, headphone motion, batched high-frequency wo3.8Kskills.sh installs
5dpearson2699 avatarnatural-languagedpearson2699/swift-ios-skillsTokenize, tag, and analyze natural language text using Apple's NaturalLanguage framework and translate between languages with the Translation framework. Use whe3.8Kskills.sh installs
6dpearson2699 avatarspeech-recognitiondpearson2699/swift-ios-skillsTranscribe speech to text using Apple's Speech framework. Use when implementing live microphone transcription with AVAudioEngine, recognizing recorded audio fil3.8Kskills.sh installs