Flutter SDK
Native Flutter SDK for screenshots, crash reporting, screen recording, session replay, and feature requests.
Installation
Download Flutter SDK
Source package — add as a local path dependency. pub.dev coming soon.
Unzip the download, place the flutter-sdk/ folder alongside your project, then add it as a path dependency:
# pubspec.yaml
dependencies:
mcpfeedback:
path: ../flutter-sdk
# then run
flutter pub get
Minimum Flutter SDK: 3.10 • Dart SDK: 3.0 • iOS: 13.0+ • Android: API 24+
Quick Start
Get your first feedback submission in under 5 minutes.
Install the SDK
Add the SDK to your Flutter project using pub.
# Download the SDK zip from the Flutter docs page, unzip it,
# then add to pubspec.yaml:
dependencies:
mcpfeedback:
path: ../flutter-sdk
flutter pub getGet your API key
Create an account and generate an API key in your dashboard.
Initialize in main()
Initialize before calling runApp().
import 'package:mcpfeedback/mcpfeedback.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await McpFeedback.initialize(
siteKey: 'your-site-key',
config: McpFeedbackConfig(
shakeEnabled: true,
floatingButtonEnabled: true,
),
);
runApp(const MyApp());
}Verify it works
Shake your device or tap the floating button. Submit a test report and check your MCPFeedback dashboard.
API Key Setup
Your site key is available in Dashboard > Settings > API Keys. Each site has its own key — use the key for the app you are instrumenting.
Configuration
Pass a McpFeedbackConfig to McpFeedback.initialize().
| Parameter | Type | Default | Description |
|---|---|---|---|
| siteKey | String | required | Your site identifier from the dashboard |
| apiBaseUrl | String? | null | Custom API base URL — defaults to production |
| shakeEnabled | bool | true | Enable shake-to-report gesture |
| floatingButtonEnabled | bool | true | Show persistent floating feedback button |
| screenshotDetectEnabled | bool | true | Detect screenshot gesture and prompt feedback |
| twoFingerSwipeEnabled | bool | false | Two-finger swipe up to trigger feedback |
| networkLoggingEnabled | bool | true | Automatically capture HTTP requests with each report |
| crashReportingEnabled | bool | true | Capture uncaught exceptions and submit on next launch |
| sessionReplayEnabled | bool | false | Capture UI-change screenshots as a replay timeline |
| privacyTier | PrivacyTier | standard | strict | standard | relaxed — controls what is masked in replays |
| accentColor | Color? | null | Override SDK UI accent color |
| maxNetworkBodyBytes | int | 10240 | Max request/response body bytes captured per log entry |
| urlFilter | List<RegExp>? | null | URL patterns to exclude from network logging |
Screenshot Capture
The SDK uses Flutter's RenderRepaintBoundary to capture the current widget tree into a PNG at the moment feedback is triggered. The capture happens before the SDK UI is rendered so the SDK overlay is never included.
Annotation Tools
After screenshot capture, users can annotate before submitting. Three tools are available:
- Pen — freehand drawing in configurable color and stroke width
- Highlight — translucent rectangle to draw attention to a region
- Blur — blurs a rectangular region for privacy (redacts PII before upload)
Annotations are rasterized into the final PNG upload — the dashboard displays the annotated image.
Invocation Methods
Six ways users or your code can open the feedback form:
Shake to report
Enabled by default. Detects shake gesture via accelerometer.
// shakeEnabled: true in McpFeedbackConfig (default)
Floating button
Persistent overlay button. Configurable position and color.
floatingButtonEnabled: true // default
Screenshot detection
Detects when the user takes a system screenshot and prompts for feedback.
screenshotDetectEnabled: true // default
Programmatic
Trigger from your own UI — e.g., a Help menu item.
await McpFeedback.show(context);
Two-finger swipe
Two-finger swipe upward to open feedback.
twoFingerSwipeEnabled: true
Network Logging
The SDK intercepts HTTP requests via a custom HttpOverrides and attaches the last N requests to each feedback report.
Request and response bodies above maxNetworkBodyBytes are truncated. Authorization headers are redacted by default.
Crash Reporting
The SDK registers a FlutterError.onError handler and an isolate error listener to capture all unhandled exceptions and errors. Reports are queued locally and submitted on next app launch.
Each crash report includes: exception message, stack trace, device info, OS version, app version, and the last 20 network log entries captured before the crash.
Screen Recording
Users can attach a short screen recording to feedback reports. On iOS the SDK uses ReplayKit; on Android it uses MediaProjection. Recordings are MP4 (H.264) capped at 30 seconds by default.
Privacy masking applies to all recordings — views marked with McpFeedbackMask are blurred before upload.
Session Replay
Session Replay captures lightweight UI-change screenshots (not video) and assembles them into a scrubable timeline visible in the dashboard alongside each feedback report.
| Privacy Tier | Behavior |
|---|---|
| strict | Mask all text and images — only layout structure captured |
| standard | Mask text fields and images marked private; show UI structure |
| relaxed | Only mask views explicitly wrapped in McpFeedbackMask |
Feature Requests
The Feature Requests module lets users submit, browse, vote on, and comment on feature ideas without leaving your app. Votes and status changes appear in real-time in the dashboard.
Feature requests submitted here appear under Feature Requests in your MCPFeedback dashboard and are accessible via the MCP list_feature_requests tool.
Privacy Masking
Wrap any widget with McpFeedbackMask to prevent it from appearing in screenshots, recordings, and replays.
Masking is enforced at capture time — masked regions are replaced with a solid block before the image leaves the device.
Offline Queue
All submissions (feedback, crash reports, feature requests) are persisted to a local SQLite queue before being sent. If the device is offline or the upload fails, the SDK retries with exponential backoff on reconnect.
API Reference
The full API reference is auto-generated from Dart doc comments using dart doc.
Flutter API Reference
Auto-generated from source code comments — always up to date with the latest SDK version.
View Flutter API Reference →To regenerate locally: bash scripts/generate-api-docs.sh