$npx -y skills add getsentry/sentry-for-ai --skill sentry-flutter-sdkFull Sentry SDK setup for Flutter and Dart. Use when asked to "add Sentry to Flutter", "install sentry_flutter", "setup Sentry in Dart", or configure error monitoring, tracing, profiling, session replay, or logging for Flutter applications. Supports Android, iOS, macOS, Linux, Wi
| 1 | > [All Skills](../../SKILL_TREE.md) > [SDK Setup](../sentry-sdk-setup/SKILL.md) > Flutter SDK |
| 2 | |
| 3 | # Sentry Flutter SDK |
| 4 | |
| 5 | Opinionated wizard that scans your Flutter or Dart project and guides you through complete Sentry setup — error monitoring, tracing, session replay, logging, profiling, and ecosystem integrations. |
| 6 | |
| 7 | ## Invoke This Skill When |
| 8 | |
| 9 | - User asks to "add Sentry to Flutter" or "set up Sentry" in a Flutter or Dart app |
| 10 | - User wants error monitoring, tracing, profiling, session replay, or logging in Flutter |
| 11 | - User mentions `sentry_flutter`, `sentry_dart`, mobile error tracking, or Sentry for Flutter |
| 12 | - User wants to monitor native crashes, ANRs, or app hangs on iOS/Android |
| 13 | |
| 14 | > **Note:** SDK versions and APIs below reflect `sentry_flutter` ≥9.14.0 (current stable, February 2026). |
| 15 | > Always verify against [docs.sentry.io/platforms/flutter/](https://docs.sentry.io/platforms/flutter/) before implementing. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## Phase 1: Detect |
| 20 | |
| 21 | Run these commands to understand the project before making any recommendations: |
| 22 | |
| 23 | ```bash |
| 24 | # Detect Flutter project type and existing Sentry |
| 25 | cat pubspec.yaml | grep -E '(sentry|flutter|dart)' |
| 26 | |
| 27 | # Check SDK version |
| 28 | cat pubspec.yaml | grep -A2 'environment:' |
| 29 | |
| 30 | # Check for existing Sentry initialization |
| 31 | grep -r "SentryFlutter.init\|Sentry.init" lib/ 2>/dev/null | head -5 |
| 32 | |
| 33 | # Detect navigation library |
| 34 | grep -E '(go_router|auto_route|get:|beamer|routemaster)' pubspec.yaml |
| 35 | |
| 36 | # Detect HTTP client |
| 37 | grep -E '(dio:|http:|chopper:)' pubspec.yaml |
| 38 | |
| 39 | # Detect database packages |
| 40 | grep -E '(sqflite|drift|hive|isar|floor)' pubspec.yaml |
| 41 | |
| 42 | # Detect state management (for integration patterns) |
| 43 | grep -E '(flutter_bloc|riverpod|provider:|get:)' pubspec.yaml |
| 44 | |
| 45 | # Detect GraphQL |
| 46 | grep -E '(graphql|ferry|gql)' pubspec.yaml |
| 47 | |
| 48 | # Detect Firebase |
| 49 | grep -E '(firebase_core|supabase)' pubspec.yaml |
| 50 | |
| 51 | # Detect backend for cross-link |
| 52 | ls ../backend/ ../server/ ../api/ 2>/dev/null |
| 53 | find .. -maxdepth 3 \( -name "go.mod" -o -name "requirements.txt" -o -name "Gemfile" -o -name "*.csproj" \) 2>/dev/null | grep -v flutter | head -10 |
| 54 | |
| 55 | # Detect platform targets |
| 56 | ls android/ ios/ macos/ linux/ windows/ web/ 2>/dev/null |
| 57 | ``` |
| 58 | |
| 59 | **What to determine:** |
| 60 | |
| 61 | | Question | Impact | |
| 62 | |----------|--------| |
| 63 | | `sentry_flutter` already in `pubspec.yaml`? | Skip install, jump to feature config | |
| 64 | | Dart SDK `>=3.5`? | Required for `sentry_flutter` ≥9.0.0 | |
| 65 | | `go_router` or `auto_route` present? | Use `SentryNavigatorObserver` — specific patterns apply | |
| 66 | | `dio` present? | Recommend `sentry_dio` integration | |
| 67 | | `sqflite`, `drift`, `hive`, `isar` present? | Recommend matching `sentry_*` DB package | |
| 68 | | Has `android/` and `ios/` directories? | Full mobile feature set available | |
| 69 | | Has `web/` directory only? | Session Replay and Profiling unavailable | |
| 70 | | Has `macos/` directory? | Profiling available (alpha) | |
| 71 | | Backend directory detected? | Trigger Phase 4 cross-link | |
| 72 | |
| 73 | --- |
| 74 | |
| 75 | ## Phase 2: Recommend |
| 76 | |
| 77 | Present a concrete recommendation based on what you found. Don't ask open-ended questions — lead with a proposal: |
| 78 | |
| 79 | **Recommended (core coverage — always set up these):** |
| 80 | - ✅ **Error Monitoring** — captures Dart exceptions, Flutter framework errors, and native crashes (iOS + Android) |
| 81 | - ✅ **Tracing** — auto-instruments navigation, app start, network requests, and UI interactions |
| 82 | - ✅ **Session Replay** — captures widget tree screenshots for debugging (iOS + Android only) |
| 83 | |
| 84 | **Optional (enhanced observability):** |
| 85 | - ⚡ **Profiling** — CPU profiling; iOS and macOS only (alpha) |
| 86 | - ⚡ **Logging** — structured logs via `Sentry.logger.*` and `sentry_logging` integration |
| 87 | - ⚡ **Metrics** — counters, gauges, distributions (SDK ≥9.11.0) |
| 88 | |
| 89 | **Platform limitations — be upfront:** |
| 90 | |
| 91 | | Feature | Platforms | Notes | |
| 92 | |---------|-----------|-------| |
| 93 | | Session Replay | iOS, Android | Not available on macOS, Linux, Windows, Web | |
| 94 | | Profiling | iOS, macOS | Alpha status; not available on Android, Linux, Windows, Web | |
| 95 | | Native crashes | iOS, Android, macOS | NDK/signal handling; Linux/Windows/Web: Dart exceptions only | |
| 96 | | App Start metrics | iOS, Android | Not available on desktop/web | |
| 97 | | Slow/frozen frames | iOS, Android, macOS | Not available on Linux, Windows, Web | |
| 98 | | Crons | N/A | **Not available** in the Flutter/Dart SDK | |
| 99 | |
| 100 | Propose: *"For your Flutter app targeting iOS/Android, I recommend Error Monitoring + Tracing + Session Replay. Want me to also add Logging and Profiling (iOS/macOS alpha)?"* |
| 101 | |
| 102 | --- |
| 103 | |
| 104 | ## Phase 3: Guide |
| 105 | |
| 106 | ### Determine Your Setup Path |
| 107 | |
| 108 | | Project type | Recommended setup | |
| 109 | |-------------|------------------| |
| 110 | | Any Flutter app | Wizard CLI (handles pubspec, init, symbo |