Docs
Flutter SDK
Install, enable and configure the nabrila package in your Flutter app.
The SDK is the nabrila package, MIT licensed. It works on Android, iOS and desktop with Flutter 3.47 or newer (Dart 3.13). It works the same whether the app uses material_ui or the Material bundled with Flutter. It does not work on Flutter Web, because it uses dart:io.
Install
The official Nabrila package on pub.dev is nabrila, from the verified publisher nabrila.com, and it has no published version yet. Do not install a nabrila package that comes from another publisher.
Start Nabrila
Nabrila.run replaces your call to runApp. The floating button only appears while NabrilaScope wraps your app.
void main() {
Nabrila.run(
appKey: 'nbr_...',
enabled: const bool.fromEnvironment('NABRILA_ENABLED'),
app: () => runApp(const NabrilaScope(child: MyApp())),
);
}
| Parameter | What it does |
|---|---|
appKey |
Your app's key, which you copy from the dashboard. It decides which workspace the reports go to. |
enabled |
If false, the SDK does nothing: no button, nothing is recorded and nothing is uploaded. |
app |
The function that starts your app; normally runApp(...). |
shake |
Optional, true by default. Opens the report when the phone is shaken. It needs no permission and only listens while the app is in the foreground. With shake: false only the floating button remains. |
endpoint |
Optional. Changes the server, which defaults to https://nabrila.com. It must be https://; only debug builds accept http:// to localhost, 127.0.0.1, ::1 or 10.0.2.2 (the Android emulator). With any other address the SDK stays off and says so in the console. |
keepKeyOnDevice |
Optional, false by default. With true the report key never leaves the phone, even when your plan keeps keys on the server. Your team can then open those reports only from their link, not from the dashboard. |
Enable it only in test builds
TestFlight and internal APKs are release builds, so the SDK ships in release and enabled decides whether it does anything. Pass it when you build for testers:
flutter build apk --dart-define=NABRILA_ENABLED=true
flutter build ipa --dart-define=NABRILA_ENABLED=true
In the build you publish to the stores, don't pass the --dart-define.
Know which commit each build came from
Add the commit when you build and every report says which code the build came from:
flutter build apk --dart-define=NABRILA_ENABLED=true --dart-define=NABRILA_COMMIT=$(git rev-parse HEAD)
The commit travels encrypted inside the report, like everything else. You see it under Environment, in the text for your agent and in the issue, and the MCP server shows your agent what changed in the code since that build. If you leave it out, the report simply doesn't carry it.
Record route changes
Add the Nabrila observer to your MaterialApp (or CupertinoApp):
MaterialApp(
navigatorObservers: [Nabrila.navigatorObserver],
// ...
)
With go_router, pass it in observers. It hands it to the navigators of its shell routes too, so bottom tabs are recorded as well. Routes are named by their path pattern.
GoRouter(observers: [Nabrila.navigatorObserver], routes: [...])
Add data from your app
Nabrila.setContext adds your own data to every report (environment, test account, feature flags). Values are sent as text, up to 200 characters, with at most 30 pairs. A key that sounds secret (token, password, session…) is sent as [REDACTED].
Nabrila.setContext('env', 'staging');
Nabrila.setContext('plan', user.plan);
Nabrila.setContext('plan', null); // removes it
Switching users in your app
When the person using your app changes (sign-out or account switch), call Nabrila.clearSession() before the next screen shows. It deletes the taps, screens, console, requests, active route and replay recorded so far, so the next report carries nothing from the previous person. Pairs from setContext stay; if they are about that person, remove them with Nabrila.clearContext().
await auth.signOut();
Nabrila.clearSession();
Nabrila.clearContext(); // only if your context data was about that person
Report kind and pointed element
A report is for anything a person notices: something fails, looks wrong, shows wrong data, or an idea. The tester picks the kind (optional) and can tap the screenshot to point at an element. The SDK finds it in the live app and sends its widget type and its visible text (never inside a NabrilaMask, and never the value of a text field). In debug builds it also sends the file, line and column where it was written, relative to your package (lib/checkout/pay_button.dart:42). Release builds do not track where widgets are created, so they send the widget and text only.
Before sending, the What gets sent sheet lists everything the report carries.
Saved reports
If a report could not go out, it is saved on the phone and retried when the app opens or comes back. Nabrila.discardSavedReports() deletes every report still waiting, for apps that let testers opt out. A build with enabled: false does it on its own.
Dependencies
cryptography, dio, http, package_info_plus and share_plus. dio is only imported by package:nabrila/dio.dart, but pub still resolves it for every app, because Dart has no optional dependencies.
Next steps
- Network requests: record
httpor Dio calls. - Hide private data: cover areas of the screen with
NabrilaMask. - Replay: the moments before the report, as video or captures.
- Report delivery: retries, no duplicates and the status the tester sees.
- Known limits: what the SDK doesn't capture yet.
The reference for each class in the package will be on pub.dev, which generates it when the package is published.