refactor: Null safe dependencies

This commit is contained in:
Christian Pauly 2021-04-21 14:19:54 +02:00
commit 1a477adcb1
34 changed files with 320 additions and 381 deletions

View file

@ -22,13 +22,13 @@ abstract class SentryController {
return await storage.getItemBool(SettingKeys.sentry);
}
static final sentry = SentryClient(dsn: AppConfig.sentryDns);
static final sentry = SentryClient(SentryOptions(dsn: AppConfig.sentryDns));
static void captureException(error, stackTrace) async {
Logs().e('Capture exception', error, stackTrace);
if (!kDebugMode && await getSentryStatus()) {
await sentry.captureException(
exception: error,
error,
stackTrace: stackTrace,
);
}