fix: Sentry and small null fix

This commit is contained in:
Sorunome 2020-10-28 18:13:04 +01:00
commit e9f3aa37dd
3 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,7 @@ import 'package:bot_toast/bot_toast.dart';
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:sentry/sentry.dart';
@ -31,8 +32,7 @@ abstract class SentryController {
static void captureException(error, stackTrace) async {
debugPrint(error.toString());
debugPrint(stackTrace.toString());
final storage = Store();
if (await storage.getItem('sentry') == 'true') {
if (!kDebugMode && await getSentryStatus()) {
await sentry.captureException(
exception: error,
stackTrace: stackTrace,