The Dynatrace Flutter Plugin automatically captures every tap and reports it as a user interaction event. For a full conceptual overview, see User interactions. The sections below cover Flutter-specific behavior and instrumentation details.
Every tap produces a ui_element.* event regardless of which widget receives it. A ui_element.responder.* group is added only when the plugin recognizes the widget as an interactive control.
The following table lists which widgets receive responder attribution:
| Widget | Responder attribution | Notes |
|---|---|---|
| Yes | Deactivated buttons do not receive responder attribution. |
| Yes | Requires |
| Yes | Requires a tap handler to be attributed. |
| Yes | Requires |
| Yes | |
| Yes | |
Chips, | Yes | Attributed through their internal |
| No | Still captured via |
| No | Still captured via |
| No | Still captured via |
Any other tapped widget | No | Still captured via |
The detected_name field in each interaction event is resolved using the following priority order. The first source with a value wins:
masked state (if the widget is inside a masked UserInteractionWidget)customName from an enclosing UserInteractionWidgetSemantics labelTooltip messageIconButton tooltip, else its icon's semanticLabelIcon semanticLabelText contentRichText contentListTile title, else subtitleIf none of these sources apply, the widget's type name is used and name_origin is set to component.
Each interaction event includes a path describing the widget's position in the tree. Paths are constructed according to the following rules:
ListView, GridView, or sliver carry an index on the last segment, for example ListView/SliverList/ListTile/InkWell[3].In builds compiled with --obfuscate, Dart type names are mangled. Widget paths and type-name fallbacks become unreadable in that case.
To produce stable, human-readable labels in obfuscated builds, use one of the following:
UserInteractionWidget(customName: 'My label') on the widgetSemantics label: Semantics(label: 'My label', child: ...)Tooltip message: Tooltip(message: 'My label', child: ...)UserInteractionWidget lets you assign a stable name to any widget. Wrap the target widget and set customName to the name you want to appear in detected_name.
import 'package:dynatrace_flutter_plugin/dynatrace_flutter_plugin.dart';// Instead of showing "ElevatedButton" as detected_name,// this will show "LoginButton"UserInteractionWidget(customName: 'LoginButton',child: ElevatedButton(onPressed: () { /* handle login */ },child: const Text('Log In'),),)
customName overrides detected_name only. It does not affect the widget path, view names, or any other instrumentation.
You can apply customName at multiple levels. A container-level name applies to all interactions resolved through it, and more specific names on child widgets take precedence.
To mask sensitive UI element names instead of renaming them, see Mask user interactions.
User interactions and user actions are distinct events. Every tap produces an interaction event. A user action is created only when a tap is followed by a web request or view navigation within 100 ms.
For workflows the plugin cannot detect automatically—such as multi-step processes or background tasks—use createUserAction. See User action instrumentation for the full API.