#10914 integrate crash reporting
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/db.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:checker/screens/splash.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:sentry/sentry.dart';
|
||||
|
||||
const platform = const MethodChannel('com.dinect.checker/instance_id');
|
||||
|
||||
@@ -50,8 +53,23 @@ createSettingsTable(String app, String name, SqliteHelper helper) {
|
||||
}
|
||||
|
||||
start(String app, String name, String locale, SqliteHelper helper) {
|
||||
final SentryClient sentry = new SentryClient(
|
||||
dsn: 'https://42166056b75d4fe49455555a9bc576a0@sentry.io/1376057');
|
||||
|
||||
FlutterError.onError = (FlutterErrorDetails details) {
|
||||
FlutterError.dumpErrorToConsole(details);
|
||||
Zone.current.handleUncaughtError(details.exception, details.stack);
|
||||
};
|
||||
|
||||
StringsLocalization.load(locale).then((_) {
|
||||
runApp(new Checker(app, name, helper));
|
||||
runZoned<Future<Null>>(() async {
|
||||
runApp(new Checker(app, name, helper));
|
||||
}, onError: (error, stackTrace) async {
|
||||
sentry.captureException(
|
||||
exception: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
21
pubspec.lock
21
pubspec.lock
@@ -76,6 +76,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
sentry:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -102,6 +109,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.2+1"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.3"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -123,6 +137,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
usage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: usage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.4.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -8,6 +8,7 @@ dependencies:
|
||||
sqflite: "0.12.2+1"
|
||||
image_picker: '^0.4.1' # use for ask permissions @ iOS
|
||||
xml: "^3.0.0"
|
||||
sentry: 2.2.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user