Skip to content

Commit

Permalink
Flutter: change widget to SentryWidget (#8993)
Browse files Browse the repository at this point in the history
* Change to SentryWidget
  • Loading branch information
buenaflor authored Feb 13, 2024
1 parent 75c87f6 commit 4d63b7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ Before starting, ensure:

### 1. Wrap root widget

Wrap your root widget with `SentryUserInteractionWidget`:
Wrap your root widget with `SentryWidget`:

```dart
Future<void> main2() async {
Future<void> main() async {
await SentryFlutter.init(
// Configure your options
(options) => options.dsn = '___DSN___',
appRunner: () => runApp(SentryUserInteractionWidget(child: MyApp())),
appRunner: () => runApp(SentryWidget(child: MyApp())),
);
}
```
Expand Down Expand Up @@ -91,7 +91,7 @@ import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) => options.enableUserInteractionTracing = false,
appRunner: () => runApp(SentryUserInteractionWidget(child: MyApp())),
appRunner: () => runApp(SentryWidget(child: MyApp())),
);
}
```
Expand All @@ -108,7 +108,7 @@ import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) => options.enableUserInteractionBreadcrumbs = false,
appRunner: () => runApp(SentryUserInteractionWidget(child: MyApp())),
appRunner: () => runApp(SentryWidget(child: MyApp())),
);
}
```
Expand All @@ -125,7 +125,7 @@ import 'package:sentry_flutter/sentry_flutter.dart';
Future<void> main() async {
await SentryFlutter.init(
(options) => options.sendDefaultPii = true,
appRunner: () => runApp(SentryUserInteractionWidget(child: MyApp())),
appRunner: () => runApp(SentryWidget(child: MyApp())),
);
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Future<void> main() async {
options.attachScreenshot = true;
},
appRunner: () => runApp(
// Wrap your app widget with the [SentryScreenshotWidget] widget.
SentryScreenshotWidget(
// Wrap your app widget with the [SentryWidget] widget.
SentryWidget(
child: MyApp(),
),
),
Expand Down

0 comments on commit 4d63b7f

Please sign in to comment.