From 464c501f3988368396cc1d5e96fcff88378b584c Mon Sep 17 00:00:00 2001 From: Ivan Dlugos <6349682+vaind@users.noreply.github.com> Date: Mon, 27 Jan 2025 11:57:52 +0100 Subject: [PATCH] enha: use SentryWidget in Flutter onboarding (#83697) --- .../app/gettingStartedDocs/flutter/flutter.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/static/app/gettingStartedDocs/flutter/flutter.tsx b/static/app/gettingStartedDocs/flutter/flutter.tsx index 6711f3e3e3d61b..cc2c211bd05d67 100644 --- a/static/app/gettingStartedDocs/flutter/flutter.tsx +++ b/static/app/gettingStartedDocs/flutter/flutter.tsx @@ -48,7 +48,11 @@ Future main() async { : '' } }, - appRunner: () => runApp(const MyApp()), + appRunner: () => runApp( + SentryWidget( + child: MyApp(), + ), + ), ); // or define SENTRY_DSN via Dart environment variable (--dart-define) @@ -109,7 +113,11 @@ Future main() async { options.dsn = '${params.dsn.public}'; options.enableMetrics = true; }, - appRunner: initApp, // Init your App. + appRunner: () => runApp( + SentryWidget( + child: MyApp(), + ), + ), ); };`; @@ -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(), + ), + ), ); `;