Skip to content

Commit

Permalink
enha: use SentryWidget in Flutter onboarding (#83697)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind authored Jan 27, 2025
1 parent e881b51 commit ee7a0e1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions static/app/gettingStartedDocs/flutter/flutter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ Future<void> main() async {
: ''
}
},
appRunner: () => runApp(const MyApp()),
appRunner: () => runApp(
SentryWidget(
child: MyApp(),
),
),
);
// or define SENTRY_DSN via Dart environment variable (--dart-define)
Expand Down Expand Up @@ -109,7 +113,11 @@ Future<void> main() async {
options.dsn = '${params.dsn.public}';
options.enableMetrics = true;
},
appRunner: initApp, // Init your App.
appRunner: () => runApp(
SentryWidget(
child: MyApp(),
),
),
);
};`;

Expand All @@ -120,7 +128,11 @@ await SentryFlutter.init(
options.experimental.replay.sessionSampleRate = 1.0;
options.experimental.replay.onErrorSampleRate = 1.0;
},
appRunner: () => runApp(MyApp()),
appRunner: () => runApp(
SentryWidget(
child: MyApp(),
),
),
);
`;

Expand Down

0 comments on commit ee7a0e1

Please sign in to comment.