forked from vikunja/app
parent
2abdcc4ca9
commit
8f595c340f
@ -1,2 +0,0 @@
|
||||
const SENTRY_DSN =
|
||||
'https://b070ed4bd1d043428db6fe7d1ce57908@sentry.kolaente.de/5';
|
@ -1,54 +1,10 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sentry/sentry.dart';
|
||||
import 'package:vikunja_app/constants.dart';
|
||||
import 'package:vikunja_app/global.dart';
|
||||
import 'package:vikunja_app/pages/home.dart';
|
||||
import 'package:vikunja_app/pages/user/login.dart';
|
||||
import 'package:vikunja_app/theme/theme.dart';
|
||||
|
||||
void main() {
|
||||
if (!kReleaseMode) {
|
||||
// only log errors in release mode
|
||||
_startApp();
|
||||
return;
|
||||
}
|
||||
var sentry = new SentryClient(dsn: SENTRY_DSN);
|
||||
|
||||
FlutterError.onError = (details, {bool forceReport = false}) {
|
||||
try {
|
||||
sentry.captureException(
|
||||
exception: details.exception,
|
||||
stackTrace: details.stack,
|
||||
);
|
||||
} catch (e) {
|
||||
print('Sending report to sentry.io failed: $e');
|
||||
} finally {
|
||||
// Also use Flutter's pretty error logging to the device's console.
|
||||
FlutterError.dumpErrorToConsole(details, forceReport: forceReport);
|
||||
}
|
||||
};
|
||||
|
||||
runZoned(
|
||||
_startApp,
|
||||
onError: (Object error, StackTrace stackTrace) {
|
||||
try {
|
||||
sentry.captureException(
|
||||
exception: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
print('Error sent to sentry.io: $error');
|
||||
} catch (e) {
|
||||
print('Sending report to sentry.io failed: $e');
|
||||
print('Original error: $error');
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
_startApp() => runApp(VikunjaGlobal(
|
||||
void main() => runApp(VikunjaGlobal(
|
||||
child: new VikunjaApp(home: HomePage()),
|
||||
login: new VikunjaApp(home: LoginPage())));
|
||||
|
||||
|
44
pubspec.lock
44
pubspec.lock
@ -14,42 +14,42 @@ packages:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.13"
|
||||
version: "2.0.11"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
version: "1.5.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "1.0.5"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
version: "1.1.2"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.14.12"
|
||||
version: "1.14.11"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -63,7 +63,7 @@ packages:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.3"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -98,7 +98,7 @@ packages:
|
||||
name: flutter_secure_storage
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.3"
|
||||
version: "3.3.1+1"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -110,7 +110,7 @@ packages:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.1"
|
||||
version: "0.12.0+3"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -124,7 +124,7 @@ packages:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.12"
|
||||
version: "2.1.4"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -166,14 +166,7 @@ packages:
|
||||
name: quiver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
sentry:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "2.0.5"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@ -185,7 +178,7 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
version: "1.5.5"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -220,7 +213,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.15"
|
||||
version: "0.2.11"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -228,13 +221,6 @@ 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:
|
||||
@ -248,7 +234,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.6.1"
|
||||
version: "3.5.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -257,4 +243,4 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
sdks:
|
||||
dart: ">=2.6.0 <3.0.0"
|
||||
dart: ">=2.4.0 <3.0.0"
|
||||
|
@ -10,10 +10,9 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
cupertino_icons: ^0.1.3
|
||||
flutter_secure_storage: ^3.3.3
|
||||
http: ^0.12.1
|
||||
flutter_secure_storage: 3.3.1+1
|
||||
http: 0.12.0+3
|
||||
after_layout: ^1.0.7
|
||||
sentry: ^3.0.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Loading…
x
Reference in New Issue
Block a user