name: flutter-master description: | The definitive Flutter mobile app development skill for building production-grade, high-performance Flutter applications. USE THIS SKILL whenever the user mentions Flutter, Dart mobile development, cross-platform mobile apps, or any of these specific topics: Flutter animations (implicit, explicit, physics-based, Rive, Lottie, Hero transitions, CustomPainter, staggered), Flutter performance optimization (widget rebuilds, Impeller, frame budget, jank, isolates, memory leaks, app size), Flutter state management (Riverpod 3.0 (stable), BLoC 9.0+, Provider, Signals, Clean Architecture), Flutter debugging (DevTools, performance profiling, memory leaks, shader warmup), Flutter architecture (Clean Architecture, repository pattern, dependency injection, folder structure), Flutter testing (unit, widget, integration, golden tests, mocking, TDD), Flutter CI/CD (Fastlane, Codemagic, GitHub Actions, flavors, store deployment), Flutter UI (Material Design 3, Cupertino, responsive design, accessibility, i18n, dynamic theming), Flutter navigation (GoRouter, deep linking, nested navigation, route guards), Flutter networking (Dio, Retrofit, offline-first, caching, WebSocket, GraphQL), or building any mobile app with Flutter/Dart. Also trigger for: splash screens, onboarding flows, custom painters, shader effects, gesture-driven interactions, pull-to-refresh, infinite scroll, chat UIs, e-commerce apps, fintech apps, social media apps, health apps built with Flutter. This skill transforms Claude into a Flutter expert that writes performant, bug-free, beautifully animated mobile applications rivaling the best on App Store and Play Store.
Flutter Master
Philosophy: 60fps or nothing. Bug-free by design. Beautiful by default. Target: Flutter 3.38+ / Dart 3.10+ / Impeller-mandatory (iOS) & default (Android) / 2025-2026 era
Reference File Navigator
Use this table to find the right reference for any Flutter task. Read the relevant file BEFORE writing code.
| Task | Read This |
|---|---|
| Performance & rendering | references/performance-optimization.md |
| Preventing rebuilds | references/widget-rebuild-optimization.md |
| Memory, isolates, app size | references/memory-isolates-optimization.md |
| Animations (implicit/explicit/physics) | references/animations-mastery.md |
| Rive & Lottie | references/rive-lottie-integration.md |
| CustomPainter & shaders | references/custom-painters-shaders.md |
| Gestures & interactions | references/gesture-interactions.md |
| Riverpod / Clean Architecture | references/state-management.md |
| BLoC / Testing / Error handling | references/testing-error-handling.md |
| DevTools & profiling | references/debugging-profiling.md |
| CI/CD & deployment | references/ci-cd-deployment.md |
| Material 3, adaptive UI, a11y | references/platform-adaptive-ui.md |
| GoRouter & deep linking | references/navigation-routing.md |
| Dio, offline-first, data layer | references/networking-data.md |
| Package selection | references/pub-packages-ecosystem.md |
| Dart 3.7–3.11 language features | references/dart-language-features.md |
| Flutter breaking changes (3.24–3.41) | references/flutter-breaking-changes.md |
| Animation recipes (copy-paste) | patterns/animation-recipes.md |
| App scaffold template | patterns/app-scaffold.md |
| Widget patterns | patterns/widget-patterns.md |
| Anti-patterns gallery | patterns/anti-patterns.md |
| Pre-release checklist | checklists/pre-release-checklist.md |
| Code review checklist | checklists/code-review-checklist.md |
| Performance audit | checklists/performance-audit.md |
| ── FLUTTER UI/UX MASTERY ADD-ON ── | |
| Mobile psychology (Hick's, Fitts's, Miller's) | flutter-ui-ux/references/mobile-psychology-flutter.md |
| Thumb zone ergonomics | flutter-ui-ux/references/thumb-zone-flutter.md |
| Form design mastery | flutter-ui-ux/references/form-mastery-flutter.md |
| Haptic feedback & micro-interactions | flutter-ui-ux/references/haptic-micro-interactions.md |
| Typography & dynamic theming | flutter-ui-ux/references/typography-theming-flutter.md |
| Dark mode design system | flutter-ui-ux/references/dark-mode-flutter.md |
| Conversion optimization patterns | flutter-ui-ux/references/conversion-patterns-flutter.md |
| Deep accessibility implementation | flutter-ui-ux/references/accessibility-deep-flutter.md |
| UX code patterns (15+ widgets) | flutter-ui-ux/code-patterns/ux-patterns.md |
| Mobile UX audit checklist | flutter-ui-ux/checklists/mobile-ux-audit-flutter.md |
| UI design review checklist | flutter-ui-ux/checklists/design-review-flutter.md |
| ── FLUTTER DEBUGGER MASTERY ADD-ON ── | |
| Debug methodology (Ultimate Debugger for Flutter) | flutter-debugger/references/flutter-debug-methodology.md |
| Widget tree & rebuild debugging | flutter-debugger/references/widget-tree-debugging.md |
| State management debugging | flutter-debugger/references/state-management-debugging.md |
| Animation & rendering debugging | flutter-debugger/references/animation-debugging.md |
| Memory leak detection | flutter-debugger/references/memory-leak-debugging.md |
| Platform-specific debugging (iOS/Android) | flutter-debugger/references/platform-specific-debugging.md |
| 40+ error patterns encyclopedia | flutter-debugger/references/error-patterns-solutions.md |
| Test-driven bug fixing | flutter-debugger/references/testing-debug-integration.md |
| Code quality & Dart code smells | flutter-debugger/references/flutter-code-quality.md |
| Production monitoring (Sentry/Crashlytics) | flutter-debugger/references/flutter-production-integration.md |
| Flutter framework bug patterns | flutter-debugger/references/flutter-framework-bugs.md |
| Flutter debug checklist | flutter-debugger/checklists/flutter-debug-checklist.md |
| Crash investigation checklist | flutter-debugger/checklists/crash-investigation.md |
| ── iOS PLATFORM MASTERY ── | |
| Apple HIG in Flutter | flutter-ui-ux/references/ios/apple-hig-flutter.md |
| iOS animations & haptic engine | flutter-ui-ux/references/ios/ios-animations-haptics.md |
| iOS permissions & privacy | flutter-ui-ux/references/ios/ios-permissions-privacy.md |
| App Store submission mastery | flutter-ui-ux/references/ios/ios-app-store-mastery.md |
| Advanced iOS features | flutter-ui-ux/references/ios/ios-advanced-features.md |
| Xcode integration debugging | flutter-debugger/references/ios/xcode-integration-mastery.md |
| iOS crash & symbolication | flutter-debugger/references/ios/ios-crash-debugging.md |
| Impeller iOS debugging | flutter-debugger/references/ios/impeller-ios-debugging.md |
| iOS memory & performance | flutter-debugger/references/ios/ios-memory-performance.md |
| iOS testing & CI/CD | flutter-debugger/references/ios/ios-testing-ci.md |
| ── ANDROID PLATFORM MASTERY ── | |
| Material You deep integration | flutter-ui-ux/references/android/material-you-flutter.md |
| Android navigation & gestures | flutter-ui-ux/references/android/android-navigation-gestures.md |
| Android permissions & security | flutter-ui-ux/references/android/android-permissions-security.md |
| Play Store submission mastery | flutter-ui-ux/references/android/android-play-store-mastery.md |
| Advanced Android features | flutter-ui-ux/references/android/android-advanced-features.md |
| Gradle build mastery | flutter-debugger/references/android/gradle-build-mastery.md |
| Android crash & ANR debugging | flutter-debugger/references/android/android-crash-debugging.md |
| Impeller Android debugging | flutter-debugger/references/android/impeller-android-debugging.md |
| Android memory & performance | flutter-debugger/references/android/android-memory-performance.md |
| Android testing & CI/CD | flutter-debugger/references/android/android-testing-ci.md |
| ── PLATFORM UX NUANCES (DEEP) ── | |
| iOS UX secrets & polish | flutter-ui-ux/references/ios/ios-ux-nuances-deep.md |
| Android UX secrets & polish | flutter-ui-ux/references/android/android-ux-nuances-deep.md |
| Cross-platform UX unification | flutter-ui-ux/references/cross-platform-ux-secrets.md |
| ── BUILD A SPECIALIZED iOS APP ── | |
| iOS native integration (channels, FFI, Pigeon, extensions) | ios-apps/references/ios-native-integration.md |
| iOS data & persistence (Keychain, CloudKit, Core Data, Spotlight) | ios-apps/references/ios-data-persistence.md |
| iOS app type decision guide (10 app categories) | ios-apps/references/ios-app-types-guide.md |
| Blueprint: iOS Fintech app | ios-apps/blueprints/ios-fintech-app.md |
| Blueprint: iOS Social Media app | ios-apps/blueprints/ios-social-media-app.md |
| iOS production launch checklist | ios-apps/checklists/ios-app-production-checklist.md |
| ── BUILD A SPECIALIZED ANDROID APP ── | |
| Android native integration (channels, FFI, Pigeon, WorkManager) | android-apps/references/android-native-integration.md |
| Android data & persistence (DataStore, SAF, Scoped Storage) | android-apps/references/android-data-persistence.md |
| Android app type decision guide (10 app categories) | android-apps/references/android-app-types-guide.md |
| Blueprint: Android Fintech app (UPI, Aadhaar, RBI) | android-apps/blueprints/android-fintech-app.md |
| Blueprint: Android E-Commerce app (foldable, Android Go) | android-apps/blueprints/android-ecommerce-app.md |
| Android production launch checklist | android-apps/checklists/android-app-production-checklist.md |
Quick Decision Tree
What kind of Flutter task?
│
├── "Build a new app from scratch"
│ → Read: patterns/app-scaffold.md → references/state-management.md → references/navigation-routing.md
│
├── "Add animations"
│ ├── Simple property change? → AnimatedContainer/AnimatedOpacity (references/animations-mastery.md §2)
│ ├── Need controller? → AnimationController + Transition (references/animations-mastery.md §4)
│ ├── Physics-based? → SpringSimulation (references/animations-mastery.md §7)
│ ├── Designer-created? → Rive or Lottie (references/rive-lottie-integration.md)
│ ├── Custom drawing? → CustomPainter (references/custom-painters-shaders.md)
│ └── Gesture-driven? → references/gesture-interactions.md
│
├── "Fix performance / jank"
│ ├── Too many rebuilds? → references/widget-rebuild-optimization.md
│ ├── Rendering jank? → references/performance-optimization.md
│ ├── Memory issues? → references/memory-isolates-optimization.md
│ ├── App too large? → references/memory-isolates-optimization.md §app-size
│ └── Need to profile? → references/debugging-profiling.md
│
├── "Set up architecture"
│ ├── State management? → references/state-management.md (Riverpod recommended)
│ ├── Navigation? → references/navigation-routing.md (GoRouter recommended)
│ ├── Networking? → references/networking-data.md (Dio + Retrofit recommended)
│ └── Testing strategy? → references/testing-error-handling.md
│
├── "Deploy / CI-CD"
│ → references/ci-cd-deployment.md
│
├── "UI / Theming / Accessibility"
│ ├── Basic Material 3 / Cupertino / responsive → references/platform-adaptive-ui.md
│ ├── Psychology-backed UX decisions → flutter-ui-ux/references/mobile-psychology-flutter.md
│ ├── Touch/thumb ergonomics → flutter-ui-ux/references/thumb-zone-flutter.md
│ ├── Form design → flutter-ui-ux/references/form-mastery-flutter.md
│ ├── Haptics & micro-interactions → flutter-ui-ux/references/haptic-micro-interactions.md
│ ├── Typography & theming → flutter-ui-ux/references/typography-theming-flutter.md
│ ├── Dark mode → flutter-ui-ux/references/dark-mode-flutter.md
│ ├── Conversion optimization → flutter-ui-ux/references/conversion-patterns-flutter.md
│ └── Deep accessibility → flutter-ui-ux/references/accessibility-deep-flutter.md
│
├── "Debug a Flutter bug"
│ ├── Systematic debugging workflow → flutter-debugger/references/flutter-debug-methodology.md
│ ├── Widget rebuilding too much → flutter-debugger/references/widget-tree-debugging.md
│ ├── State not updating → flutter-debugger/references/state-management-debugging.md
│ ├── Animation jank/glitch → flutter-debugger/references/animation-debugging.md
│ ├── Memory leak suspected → flutter-debugger/references/memory-leak-debugging.md
│ ├── iOS/Android specific → flutter-debugger/references/platform-specific-debugging.md
│ ├── Got an error message → flutter-debugger/references/error-patterns-solutions.md
│ ├── Production crash → flutter-debugger/checklists/crash-investigation.md
│ └── Write test to reproduce → flutter-debugger/references/testing-debug-integration.md
│
├── "Which package should I use?"
│ → references/pub-packages-ecosystem.md
│
├── "Build a specialized iOS app"
│ ├── What type of app? → ios-apps/references/ios-app-types-guide.md (START HERE)
│ ├── Fintech/banking? → ios-apps/blueprints/ios-fintech-app.md
│ ├── Social media/content? → ios-apps/blueprints/ios-social-media-app.md
│ ├── Native integration needed? → ios-apps/references/ios-native-integration.md
│ ├── Data/persistence? → ios-apps/references/ios-data-persistence.md
│ └── Ready to launch? → ios-apps/checklists/ios-app-production-checklist.md
│
├── "Build a specialized Android app"
│ ├── What type of app? → android-apps/references/android-app-types-guide.md (START HERE)
│ ├── Fintech/banking? → android-apps/blueprints/android-fintech-app.md
│ ├── E-commerce? → android-apps/blueprints/android-ecommerce-app.md
│ ├── Native integration needed? → android-apps/references/android-native-integration.md
│ ├── Data/persistence? → android-apps/references/android-data-persistence.md
│ └── Ready to launch? → android-apps/checklists/android-app-production-checklist.md
│
└── "Code review / release"
→ checklists/code-review-checklist.md or checklists/pre-release-checklist.md
Core Principles (ALWAYS Apply)
These rules apply to EVERY Flutter task, regardless of which reference file you read:
1. Const Everything
// ALWAYS: Use const constructors wherever possible
const SizedBox(height: 16),
const EdgeInsets.all(16),
const Text('Hello'),
// Enable these lints in analysis_options.yaml:
// prefer_const_constructors: true
// prefer_const_declarations: true
// prefer_const_literals_to_create_immutables: true
2. Split Widgets, Not Methods
// BAD: Extracting build methods
class MyWidget extends StatelessWidget {
Widget _buildHeader() => ... // Still rebuilds with parent
// GOOD: Extract to separate widget class
}
class _Header extends StatelessWidget { // Gets its own Element, independent rebuilds
const _Header();
@override
Widget build(BuildContext context) => ...
}
3. Dispose Everything
@override
void dispose() {
_animationController.dispose();
_scrollController.dispose();
_textController.dispose();
_focusNode.dispose();
_subscription.cancel();
_timer?.cancel();
super.dispose();
}
4. ListView.builder for Lists
// NEVER: Column(children: items.map((i) => Widget(i)).toList())
// ALWAYS:
ListView.builder(
itemCount: items.length,
itemExtent: 72, // Fixed height = O(1) layout
itemBuilder: (context, index) => ItemWidget(item: items[index]),
)
5. Error Handling with Result Types
// Use sealed classes or fpdart Either for error handling
sealed class Result<T> {
const Result();
}
class Success<T> extends Result<T> {
final T data;
const Success(this.data);
}
class Failure<T> extends Result<T> {
final AppException error;
const Failure(this.error);
}
6. Riverpod for State (Recommended)
// Use @riverpod code generation for type-safe providers
@riverpod
class AuthNotifier extends _$AuthNotifier {
@override
FutureOr<AuthState> build() async {
return _checkAuthStatus();
}
}
7. GoRouter for Navigation
// Type-safe routing with GoRouter
GoRouter(
routes: [
GoRoute(path: '/', builder: (_, __) => const HomeScreen()),
ShellRoute(
builder: (_, __, child) => ScaffoldWithNav(child: child),
routes: [...],
),
],
redirect: (context, state) => _authRedirect(context, state),
);
8. Profile in Profile Mode
// NEVER profile in debug mode — it's 10x slower
// flutter run --profile
// Check: 16ms frame budget (60Hz) or 8ms (120Hz)
Production Tech Stack (2025-2026 Recommended)
| Category | Package | Why |
|---|---|---|
| State | riverpod + riverpod_generator |
3.0 stable with offline persistence and mutations |
| Navigation | go_router |
^14.2+, official team recommendation, deep linking |
| Networking | dio + retrofit |
5.4+, interceptors, code generation, type-safe |
| Local DB | drift (SQL, recommended) or objectbox (NoSQL) |
Isar fragmented, Hive abandoned |
| Serialization | freezed + json_serializable |
^3.2 + ^6.9, immutable, union types, codegen |
| Testing | mocktail + patrol + golden_toolkit |
Null-safe mocking, native E2E |
| CI/CD | GitHub Actions + Fastlane | Widely supported, flexible |
| Crash reporting | Sentry or Firebase Crashlytics | Production error tracking |
| Animation | Built-in + rive or lottie |
Code for simple, Rive for complex |
| Lint | very_good_analysis |
Strict, maintained by Very Good Ventures |
Animation Duration Guidelines (Material Motion)
| Complexity | Duration | Example |
|---|---|---|
| Simple | 100ms | Button press feedback, opacity toggle |
| Standard | 200ms | Card expand, chip selection |
| Complex | 300ms | Page transition, bottom sheet |
| Elaborate | 400-500ms | Hero animation, route transition |
Always use Curves.easeInOut as default. Use Curves.easeOut for enter, Curves.easeIn for exit.
Frame Budget Reference
| Refresh Rate | Budget | Build | Layout | Paint |
|---|---|---|---|---|
| 60Hz | 16.67ms | ~4ms | ~4ms | ~4ms |
| 90Hz | 11.11ms | ~3ms | ~3ms | ~3ms |
| 120Hz | 8.33ms | ~2ms | ~2ms | ~2ms |
If build phase exceeds budget: → references/widget-rebuild-optimization.md
If paint phase exceeds budget: → references/performance-optimization.md (RepaintBoundary)
If raster thread spikes: → references/debugging-profiling.md
Quick Patterns (Most Common Tasks)
Infinite Scroll with Pull-to-Refresh
RefreshIndicator(
onRefresh: () => ref.refresh(itemsProvider.future),
child: ListView.builder(
controller: _scrollController, // Add scroll listener for pagination
itemCount: items.length + (hasMore ? 1 : 0),
itemBuilder: (context, index) {
if (index == items.length) return const LoadingIndicator();
return ItemCard(item: items[index]);
},
),
)
Responsive Layout
LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth > 1200) return DesktopLayout(child: content);
if (constraints.maxWidth > 600) return TabletLayout(child: content);
return MobileLayout(child: content);
},
)
Auth-Guarded Route
GoRouter(
redirect: (context, state) {
final isLoggedIn = ref.read(authProvider).isLoggedIn;
final isLoginRoute = state.matchedLocation == '/login';
if (!isLoggedIn && !isLoginRoute) return '/login';
if (isLoggedIn && isLoginRoute) return '/';
return null;
},
)
Debounced Search
@riverpod
class SearchNotifier extends _$SearchNotifier {
Timer? _debounce;
@override
AsyncValue<List<Result>> build() => const AsyncData([]);
void search(String query) {
_debounce?.cancel();
_debounce = Timer(const Duration(milliseconds: 300), () {
state = const AsyncLoading();
_performSearch(query);
});
}
}
When Multiple References Apply
Some tasks need multiple files. Read them in this order:
| Scenario | Read Order |
|---|---|
| New feature with animations | references/state-management.md → references/animations-mastery.md → references/gesture-interactions.md |
| Performance audit | references/debugging-profiling.md → references/performance-optimization.md → references/widget-rebuild-optimization.md |
| New app setup | patterns/app-scaffold.md → references/state-management.md → references/navigation-routing.md → references/networking-data.md |
| Preparing for release | checklists/pre-release-checklist.md → references/ci-cd-deployment.md |
| E-commerce app | references/platform-adaptive-ui.md → references/animations-mastery.md → references/networking-data.md → references/pub-packages-ecosystem.md |
| UX-focused app design | flutter-ui-ux/references/mobile-psychology-flutter.md → flutter-ui-ux/references/thumb-zone-flutter.md → flutter-ui-ux/references/form-mastery-flutter.md |
| Beautiful theming | flutter-ui-ux/references/typography-theming-flutter.md → flutter-ui-ux/references/dark-mode-flutter.md → references/platform-adaptive-ui.md |
| Systematic bug fixing | flutter-debugger/references/flutter-debug-methodology.md → (specific bug type reference) → flutter-debugger/references/testing-debug-integration.md |
| Production crash investigation | flutter-debugger/checklists/crash-investigation.md → flutter-debugger/references/error-patterns-solutions.md → flutter-debugger/references/platform-specific-debugging.md |
| Onboarding/conversion flow | flutter-ui-ux/references/conversion-patterns-flutter.md → flutter-ui-ux/references/haptic-micro-interactions.md → references/animations-mastery.md |
| Accessibility audit | flutter-ui-ux/references/accessibility-deep-flutter.md → flutter-ui-ux/checklists/mobile-ux-audit-flutter.md |
| iOS fintech from scratch | ios-apps/references/ios-app-types-guide.md → ios-apps/blueprints/ios-fintech-app.md → ios-apps/references/ios-native-integration.md → ios-apps/checklists/ios-app-production-checklist.md |
| Android fintech from scratch | android-apps/references/android-app-types-guide.md → android-apps/blueprints/android-fintech-app.md → android-apps/references/android-native-integration.md → android-apps/checklists/android-app-production-checklist.md |
| iOS social/content app | ios-apps/references/ios-app-types-guide.md → ios-apps/blueprints/ios-social-media-app.md → ios-apps/references/ios-native-integration.md → flutter-ui-ux/references/ios/ios-ux-nuances-deep.md |
| Android e-commerce app | android-apps/references/android-app-types-guide.md → android-apps/blueprints/android-ecommerce-app.md → android-apps/references/android-native-integration.md → flutter-ui-ux/references/android/android-ux-nuances-deep.md |
| Cross-platform fintech | ios-apps/blueprints/ios-fintech-app.md + android-apps/blueprints/android-fintech-app.md → flutter-ui-ux/references/cross-platform-ux-secrets.md |
| Native feature integration | ios-apps/references/ios-native-integration.md + android-apps/references/android-native-integration.md → references/testing-error-handling.md |
| Platform data layer | ios-apps/references/ios-data-persistence.md + android-apps/references/android-data-persistence.md → references/networking-data.md |