flashcat_flutter_plugin. After initialization, the SDK reports the application’s views, user actions, network requests, errors, and crashes to Flashduty RUM, with source: "flutter" identifying the data source.
The current SDK version is
0.1.0 and supports only the iOS and Android platforms (Flutter Web is not supported). The Dart class names still follow the upstream Datadog* naming (such as DatadogSdk and DatadogConfiguration); only the package name flashcat_flutter_plugin and the site enum FlashcatSite are rebranded. v1 does not yet include Logs, Session Replay, or the dio / gql / grpc companion packages.Prerequisites
Before integrating the SDK, complete these steps:- Create or select a RUM application in the Flashduty console, then obtain the Application ID and Client Token
- Make sure your application can reach
https://browser.flashcat.cloud/api/v2/rum - Flutter SDK ≥ 3.0, Dart ≥ 3.0; iOS deployment target ≥ 12.0, Android
minSdkVersion≥ 21 - Initialize the SDK early in application startup (in
main())
Install the SDK
Addflashcat_flutter_plugin to pubspec.yaml, then run flutter pub get.
The pub.dev publication of
flashcat_flutter_plugin is still being confirmed. To keep the dependency resolvable, the example below uses a git source. Once it is officially published to pub.dev, you can switch to the hosted form flashcat_flutter_plugin: ^0.1.0.pubspec.yaml
Initialize the SDK
We recommend initializing inmain(), before runApp. When you start the application with DatadogSdk.runApp, the SDK automatically takes over FlutterError.onError and PlatformDispatcher.instance.onError, so it can collect unhandled exceptions without manual wiring.
main.dart
runApp, you can also initialize manually, but you must wire up error collection yourself:
Track views
Add aDatadogNavigationObserver to your MaterialApp (or CupertinoApp), and the SDK automatically records the Navigator’s route changes as RUM views.
The
DatadogNavigationObserver constructor uses the named parameter datadogSdk:. By default it uses the route’s settings.name as the view name; you can customize the view name or filter routes through the viewInfoExtractor callback.DatadogNavigationObserverProvider together with DatadogRouteAwareMixin to manage views manually.
Track user actions
In the RUM configuration,trackFrustrations is enabled by default. After you wrap your application subtree with RumUserActionDetector, the SDK automatically recognizes interactions such as taps and generates action events; you can also record actions manually.
Track network requests
Automatic network collection is provided by the separatedatadog_tracking_http_client package and enabled through the enableHttpTracking() extension method on the configuration object. It globally replaces HttpClient, records dart:io / http requests as RUM resources, and injects W3C trace headers for hosts that match firstPartyHosts.
Identify users
After sign-in, you can set the current user. The SDK writes the user fields to theusr object on subsequent RUM events.
Report errors
When you useDatadogSdk.runApp, unhandled exceptions are collected automatically. You can also manually report caught exceptions:
Crash and error stacks require uploaded symbol files to resolve back to source locations. Flutter symbols, iOS dSYM, and Android mapping files are uploaded through the FlashCat CLI, and the
version used at upload time must match the version in the SDK initialization. See Advanced configuration.Verify the integration
After integration, verify it with these steps:- Temporarily set
DatadogSdk.instance.sdkVerbosity = CoreLoggerLevel.debugduring initialization, and inspect the console logs to observe the SDK’s reporting behavior - Run the application and trigger page navigation, taps, network requests, or a manual error
- In the Flashduty RUM application, filter for
source:flutterand confirm that view, action, resource, or error events appear - For network requests, check whether the backend receives the W3C
traceparent
Next steps
Advanced configuration
Configure sampling, tracking consent, event filtering, tracing, and symbol file upload.
Compatibility
Review supported platforms, Flutter versions, companion packages, and current limits.
Data collection
Review event types, fields, and upload behavior collected automatically and manually by the SDK.