From 5f87ca4d620bc4b17a38e8b88a83f24dc14ccccb Mon Sep 17 00:00:00 2001 From: dhzdhd Date: Tue, 14 Nov 2023 19:45:36 +0530 Subject: [PATCH] Reenable Sentry on web --- lib/main.dart | 2 +- lib/src/settings/views/settings_view.dart | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 2d5f535..942752a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -31,7 +31,7 @@ void main() async { runApp(const ProviderScope(child: MyApp())); // LeakTracking.stop(); - } else if (!kIsWeb && getSentryFromStorage()) { + } else if (getSentryFromStorage()) { await SentryFlutter.init( (options) { options.dsn = diff --git a/lib/src/settings/views/settings_view.dart b/lib/src/settings/views/settings_view.dart index 3a3f882..17ea1e9 100644 --- a/lib/src/settings/views/settings_view.dart +++ b/lib/src/settings/views/settings_view.dart @@ -200,17 +200,14 @@ class SettingsView extends HookConsumerWidget { await settingsNotifier.setFloatingRunVisibility(); }), ), - Visibility( - visible: !kIsWeb, - child: ListTile( - leading: const Icon(Icons.monitor_heart_outlined), - title: const Text('Enable Sentry'), - trailing: Switch( - value: isSentryEnabled, - onChanged: (val) async { - await settingsNotifier.setSentry(); - }), - ), + ListTile( + leading: const Icon(Icons.monitor_heart_outlined), + title: const Text('Enable Sentry'), + trailing: Switch( + value: isSentryEnabled, + onChanged: (val) async { + await settingsNotifier.setSentry(); + }), ), const Gap(10), const Divider(), @@ -270,8 +267,8 @@ class SettingsView extends HookConsumerWidget { ), const Gap(10), ElevatedButton( - onPressed: () { - showDialog( + onPressed: () async { + await showDialog( context: context, builder: (BuildContext ctx) { return const ClearDialogWidget();