2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 04:35:26 +00:00

migrate showFormDialog to OneContext

This commit is contained in:
Oliver Walters
2021-02-15 20:54:15 +11:00
parent 14161c5d42
commit 80247f84c1
11 changed files with 30 additions and 31 deletions

View File

@ -85,6 +85,16 @@ bool isInDebugMode() {
}
Future<void> _uploadErrorReport(dynamic error, dynamic stackTrace) async {
// Errors thrown in development mode are unlikely to be interesting. You can
// check if you are running in dev mode using an assertion and omit sending
// the report.
if (isInDebugMode()) {
print('In dev mode. Not sending report to Sentry.io.');
return;
}
final server_info = getServerInfo();
final app_info = await getAppInfo();
final device_info = await getDeviceInfo();
@ -109,15 +119,6 @@ Future<void> sentryReportError(dynamic error, dynamic stackTrace) async {
print('Intercepted error: $error');
print(stackTrace);
// Errors thrown in development mode are unlikely to be interesting. You can
// check if you are running in dev mode using an assertion and omit sending
// the report.
if (isInDebugMode()) {
print('In dev mode. Not sending report to Sentry.io.');
return;
}
await OneContext().showDialog(
builder: (context) => AlertDialog(
title: ListTile(