{"data":{"slug":"discovered-9f0abbd4743f693c0ae8ed6d66771ffd140e15936248c4e7","title":"Flutter Expert","summary":"Build cross-platform applications with Flutter 3+ and Dart, using Riverpod\/Bloc for state management, GoRouter for navigation, and optimized widget development.","url":"https:\/\/skillshunter.net\/skills\/discovered-9f0abbd4743f693c0ae8ed6d66771ffd140e15936248c4e7","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-9f0abbd4743f693c0ae8ed6d66771ffd140e15936248c4e7","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-9f0abbd4743f693c0ae8ed6d66771ffd140e15936248c4e7.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-9f0abbd4743f693c0ae8ed6d66771ffd140e15936248c4e7\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before proceeding, ensure the project is set up with Flutter 3+ and dependencies are installed via `flutter pub get`. Run `flutter analyze` to fix all lints and warnings before building widgets. Use `flutter test` after each feature and address any failing tests by inspecting the widget tree with Flutter DevTools.","instructions":"---\nname: flutter-expert\ndescription: 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.\nlicense: MIT\nmetadata:\n  author: https:\/\/github.com\/Jeffallan\n  company: https:\/\/synergetic.solutions\n  version: \"1.1.0\"\n  domain: frontend\n  triggers: Flutter, Dart, widget, Riverpod, Bloc, GoRouter, cross-platform\n  role: specialist\n  scope: implementation\n  output-format: code\n  upstream-docs: https:\/\/docs.flutter.dev\/\n  baseline: \"Flutter 3\"\n  related-skills: react-native-expert, test-master, fullstack-guardian, firebase-expert\n---\n\n# Flutter Expert\n\nSenior mobile engineer building high-performance cross-platform applications with Flutter 3 and Dart.\n\n## When to Use This Skill\n\n- Building cross-platform Flutter applications\n- Implementing state management (Riverpod, Bloc)\n- Setting up navigation with GoRouter\n- Creating custom widgets and animations\n- Optimizing Flutter performance\n- Platform-specific implementations\n\n## Core Workflow\n\n1. **Setup** \u2014 Scaffold project, add dependencies (`flutter pub get`), configure routing\n2. **State** \u2014 Define Riverpod providers or Bloc\/Cubit classes; verify with `flutter analyze`\n   - If `flutter analyze` reports issues: fix all lints and warnings before proceeding; re-run until clean\n3. **Widgets** \u2014 Build reusable, const-optimized components; run `flutter test` after each feature\n   - If tests fail: inspect widget tree with Flutter DevTools, fix failing assertions, re-run `flutter test`\n4. **Test** \u2014 Write widget and integration tests; confirm with `flutter test --coverage`\n   - If coverage drops or tests fail: identify untested branches, add targeted tests, re-run before merging\n5. **Optimize** \u2014 Profile with Flutter DevTools (`flutter run --profile`), eliminate jank, reduce rebuilds\n   - If jank persists: check rebuild counts in the Performance overlay, isolate expensive `build()` calls, apply `const` or move state closer to consumers\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Official docs | https:\/\/docs.flutter.dev\/ | An API or behaviour not covered here; read the docs for the version the project pins |\n| Riverpod | `references\/riverpod-state.md` | State management, providers, notifiers |\n| Bloc | `references\/bloc-state.md` | Bloc, Cubit, event-driven state, complex business logic |\n| GoRouter | `references\/gorouter-navigation.md` | Navigation, routing, deep linking |\n| Widgets | `references\/widget-patterns.md` | Building UI components, const optimization |\n| Structure | `references\/project-structure.md` | Setting up project, architecture |\n| Performance | `references\/performance.md` | Optimization, profiling, jank fixes |\n\n## Code Examples\n\n### Riverpod Provider + ConsumerWidget (correct pattern)\n\n```dart\n\/\/ provider definition \u2014 Notifier, not the legacy StateNotifier\nfinal counterProvider = NotifierProvider<CounterNotifier, int>(CounterNotifier.new);\n\nclass CounterNotifier extends Notifier<int> {\n  @override\n  int build() => 0;\n  void increment() => state = state + 1; \/\/ new instance, never mutate\n}\n\n\/\/ consuming widget \u2014 use ConsumerWidget, not StatefulWidget\nclass CounterView extends ConsumerWidget {\n  const CounterView({super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final count = ref.watch(counterProvider);\n    return Text('$count');\n  }\n}\n```\n\n### Before \/ After \u2014 State Management\n\n```dart\n\/\/ \u274c WRONG: app-wide state in setState\nclass _BadCounterState extends State<BadCounter> {\n  int _count = 0;\n  void _inc() => setState(() => _count++); \/\/ causes full subtree rebuild\n}\n\n\/\/ \u2705 CORRECT: scoped Riverpod consumer\nclass GoodCounter extends ConsumerWidget {\n  const GoodCounter({super.key});\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final count = ref.watch(counterProvider);\n    return IconButton(\n      onPressed: () => ref.read(counterProvider.notifier).increment(),\n      icon: const Icon(Icons.add), \/\/ const on static widgets\n    );\n  }\n}\n```\n\n## Constraints\n\n### MUST DO\n- Use `const` constructors wherever possible\n- Implement proper keys for lists\n- Use `Consumer`\/`ConsumerWidget` for state (not `StatefulWidget`)\n- Follow Material\/Cupertino design guidelines\n- Profile with DevTools, fix jank\n- Test widgets with `flutter_test`\n\n### MUST NOT DO\n- Build widgets inside `build()` method\n- Mutate state directly (always create new instances)\n- Use `setState` for app-wide state\n- Skip `const` on static widgets\n- Ignore platform-specific behavior\n- Block UI thread with heavy computation (use `compute()`)\n\n## Troubleshooting Common Failures\n\n| Symptom | Likely Cause | Recovery |\n|---------|-------------|----------|\n| `flutter analyze` errors | Unresolved imports, missing `const`, type mismatches | Fix flagged lines; run `flutter pub get` if imports are missing |\n| Widget test assertion failures | Widget tree mismatch or async state not settled | Use `tester.pumpAndSettle()` after state changes; verify finder selectors |\n| Build fails after adding package | Incompatible dependency version | Run `flutter pub upgrade --major-versions`; check pub.dev compatibility |\n| Jank \/ dropped frames | Expensive `build()` calls, uncached widgets, heavy main-thread work | Use `RepaintBoundary`, move heavy work to `compute()`, add `const` |\n| Hot reload not reflecting changes | State held in `Notifier` not reset | Use hot restart (`R` in terminal) to reset full app state |\n\n## Output Templates\n\nWhen implementing Flutter features, provide:\n1. Widget code with proper `const` usage\n2. Provider\/Bloc definitions\n3. Route configuration if needed\n4. Test file structure\n\nMaintained by [@jeffallan](https:\/\/github.com\/jeffallan), Principal Consultant at [Synergetic Solutions](https:\/\/synergetic.solutions)\n\n[Documentation](https:\/\/jeffallan.github.io\/claude-skills\/skills\/frontend\/flutter-expert\/)\n","use_cases":["Implementing state management with Riverpod or Bloc","Setting up navigation with GoRouter","Creating custom widgets and animations","Optimizing Flutter performance with DevTools","Writing widget and integration tests with `flutter_test`"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Jeffallan\/claude-skills\/blob\/a8be463010e2ca23afe00ea00773aea7128e8971\/plugin\/skills\/flutter-expert\/SKILL.md","source_commit":"a8be463010e2ca23afe00ea00773aea7128e8971","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:47:08.000000Z","updated_at":"2026-11-29T10:53:15.000000Z","seo_title":"Flutter Expert - Cross-Platform App Development with Flutter 3+ and D","seo_description":"Expert in building high-performance cross-platform applications with Flutter 3+ and Dart. Specializes in Riverpod\/Bloc state management, GoRouter navigation, and widget-","seo_keywords":["Flutter","Dart","Riverpod","Bloc","GoRouter","cross-platform","state management","widget development"]}}