Skip to content

Commit 4328c3f

Browse files
committed
class docs
1 parent d004b7d commit 4328c3f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

flutter/lib/src/user_interaction/sentry_user_interaction_widget.dart

+20
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ import 'user_interaction_widget.dart';
1010
const _tapDeltaArea = 20 * 20;
1111
Element? _clickTrackerElement;
1212

13+
/// Enables the Auto instrumentation for user interaction tracing.
14+
/// It starts a transaction and finishes after the timeout.
15+
/// It adds a breadcrumb as well.
16+
///
17+
/// It's supported by the most common [Widget], for example:
18+
/// [ButtonStyleButton], [MaterialButton], [CupertinoButton], [InkWell],
19+
/// [IconButton] and [GestureDetector].
20+
/// Mostly for onPressed, onTap, and onLongPress events
21+
///
22+
/// Example on how to set up:
23+
/// runApp(SentryUserInteractionWidget(child: App()));
24+
///
25+
/// For transactions, enable it in the [SentryFlutterOptions.enableUserInteractionTracing].
26+
/// The idle timeout can be configured in the [SentryOptions.idleTimeout].
27+
///
28+
/// For breadcrumbs, disable it in the [SentryFlutterOptions.enableUserInteractionBreadcrumbs].
29+
///
30+
/// If you are using the [SentryScreenshotWidget] as well, make sure to add
31+
/// [SentryUserInteractionWidget] as a child of [SentryScreenshotWidget].
32+
@experimental
1333
class SentryUserInteractionWidget extends StatefulWidget {
1434
SentryUserInteractionWidget({
1535
Key? key,

0 commit comments

Comments
 (0)