File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ Future<void> main() async {
6262 // Note : Profiling alpha is available for iOS and macOS since SDK version 7.12.0
6363 options.profilesSampleRate = 1.0;
6464 },
65- appRunner : () => runApp(MyApp()),
65+ appRunner : () => runApp(
66+ SentryWidget(
67+ child : MyApp(),
68+ ),
69+ ),
6670 );
6771
6872 // you can also configure SENTRY_DSN, SENTRY_RELEASE, SENTRY_DIST, and
@@ -94,7 +98,11 @@ Future<void> main() async {
9498 // Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
9599 options.profilesSampleRate = 1.0;
96100 },
97- appRunner: () => runApp(MyApp()),
101+ appRunner: () => runApp(
102+ SentryWidget(
103+ child: MyApp(),
104+ ),
105+ ),
98106 );
99107 } (error, stackTrace) {
100108 // Automatically sends errors to Sentry, no need to do any
Original file line number Diff line number Diff line change @@ -27,14 +27,21 @@ dependencies:
2727
2828## Setup
2929
30- To set up the integration, add the following to your Sentry initialization :
30+ To set up replay, enable it by setting a non-zero sample rate. Also, make sure you've ` SentryWidget` wrapping your app :
3131
3232` ` ` dart
33- await SentryFlutter.init((options) {
34- ...
35- options.experimental.replay.sessionSampleRate = 1.0;
36- options.experimental.replay.onErrorSampleRate = 1.0;
37- });
33+ await SentryFlutter.init(
34+ (options) {
35+ ...
36+ options.experimental.replay.sessionSampleRate = 1.0;
37+ options.experimental.replay.onErrorSampleRate = 1.0;
38+ },
39+ appRunner: () => runApp(
40+ SentryWidget(
41+ child: MyApp(),
42+ ),
43+ ),
44+ );
3845` ` `
3946
4047# # Verify
You can’t perform that action at this time.
0 commit comments