flutter-dev
Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platform-specific implementations. Includes const optimization, responsive layouts, testing strategies, and DevTools profiling. Use when: building Flutter apps, implementing state management (Riverpod/Bloc), setting up GoRouter navigation, creating custom widgets, optimizing performance, writing widget tests, cross-platform development.
Best use case
flutter-dev is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platform-specific implementations. Includes const optimization, responsive layouts, testing strategies, and DevTools profiling. Use when: building Flutter apps, implementing state management (Riverpod/Bloc), setting up GoRouter navigation, creating custom widgets, optimizing performance, writing widget tests, cross-platform development.
Teams using flutter-dev should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/flutter-dev/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How flutter-dev Compares
| Feature / Agent | flutter-dev | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platform-specific implementations. Includes const optimization, responsive layouts, testing strategies, and DevTools profiling. Use when: building Flutter apps, implementing state management (Riverpod/Bloc), setting up GoRouter navigation, creating custom widgets, optimizing performance, writing widget tests, cross-platform development.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Flutter Development Guide A practical guide for building cross-platform applications with Flutter 3 and Dart. Focuses on proven patterns, state management, and performance optimization. ## Quick Reference ### Widget Patterns | Purpose | Component | |---------|-----------| | State management (simple) | `StateProvider` + `ConsumerWidget` | | State management (complex) | `NotifierProvider` / `Bloc` | | Async data | `FutureProvider` / `AsyncNotifierProvider` | | Real-time streams | `StreamProvider` | | Navigation | `GoRouter` + `context.go/push` | | Responsive layout | `LayoutBuilder` + breakpoints | | List display | `ListView.builder` | | Complex scrolling | `CustomScrollView` + Slivers | | Hooks | `HookWidget` + `useState/useEffect` | | Forms | `Form` + `TextFormField` + validation | ### Performance Patterns | Purpose | Solution | |---------|----------| | Prevent rebuilds | `const` constructors | | Selective updates | `ref.watch(provider.select(...))` | | Isolate repaints | `RepaintBoundary` | | Lazy lists | `ListView.builder` | | Heavy computation | `compute()` isolate | | Image caching | `cached_network_image` | ## Core Principles ### Widget Optimization - Use `const` constructors wherever possible - Extract static widgets to separate const classes - Use `Key` for list items (ValueKey, ObjectKey) - Prefer `ConsumerWidget` over `StatefulWidget` for state ### State Management - Riverpod for dependency injection and simple state - Bloc/Cubit for event-driven workflows and complex logic - Never mutate state directly (create new instances) - Use `select()` to minimize rebuilds ### Layout - 8pt spacing increments (8, 16, 24, 32, 48) - Responsive breakpoints: mobile (<650), tablet (650-1100), desktop (>1100) - Support all screen sizes with flexible layouts - Follow Material 3 / Cupertino design guidelines ### Performance - Profile with DevTools before optimizing - Target <16ms frame time for 60fps - Use `RepaintBoundary` for complex animations - Offload heavy work with `compute()` ## Checklist ### Widget Best Practices - [ ] `const` constructors on all static widgets - [ ] Proper `Key` on list items - [ ] `ConsumerWidget` for state-dependent widgets - [ ] No widget building inside `build()` method - [ ] Extract reusable widgets to separate files ### State Management - [ ] Immutable state objects - [ ] `select()` for granular rebuilds - [ ] Proper provider scoping - [ ] Dispose controllers and subscriptions - [ ] Handle loading/error states ### Navigation - [ ] GoRouter with typed routes - [ ] Auth guards via redirect - [ ] Deep linking support - [ ] State preservation across routes ### Performance - [ ] Profile mode testing (`flutter run --profile`) - [ ] <16ms frame rendering time - [ ] No unnecessary rebuilds (DevTools check) - [ ] Images cached and resized - [ ] Heavy computation in isolates ### Testing - [ ] Widget tests for UI components - [ ] Unit tests for business logic - [ ] Integration tests for user flows - [ ] Bloc tests with `blocTest()` ## References | Topic | Reference | |-------|-----------| | Widget patterns, const optimization, responsive layout | [Widget Patterns](references/widget-patterns.md) | | Riverpod providers, notifiers, async state | [Riverpod State Management](references/riverpod-state.md) | | Bloc, Cubit, event-driven state | [Bloc State Management](references/bloc-state.md) | | GoRouter setup, routes, deep linking | [GoRouter Navigation](references/gorouter-navigation.md) | | Feature-based structure, dependencies | [Project Structure](references/project-structure.md) | | Profiling, const optimization, DevTools | [Performance Optimization](references/performance.md) | | Widget tests, integration tests, mocking | [Testing Strategies](references/testing.md) | | iOS/Android/Web specific implementations | [Platform Integration](references/platform-specific.md) | | Implicit/explicit animations, Hero, transitions | [Animations](references/animations.md) | | Dio, interceptors, error handling, caching | [Networking](references/networking.md) | | Form validation, FormField, input formatters | [Forms](references/forms.md) | | i18n, flutter_localizations, intl | [Localization](references/localization.md) | --- Flutter, Dart, Material Design, and Cupertino are trademarks of Google LLC and Apple Inc. respectively. Riverpod, Bloc, and GoRouter are open-source packages by their respective maintainers.
Related Skills
flutter-animations
Comprehensive guide for implementing animations in Flutter. Use when adding motion and visual effects to Flutter apps: implicit animations (AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder), explicit animations (AnimationController, Tween, AnimatedWidget/AnimatedBuilder), hero animations (shared element transitions), staggered animations (sequential/overlapping), and physics-based animations. Includes workflow for choosing the right animation type, implementation patterns, and best practices for performance and user experience.
flutter-expert
Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置
obsidian-helper
Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)
internationalizing-websites
Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.
google-official-seo-guide
Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation
github-release-assistant
Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.