flutter: sentry: Enable Sentry only on Release Mode
This commit is contained in:
parent
18e77e9003
commit
96b2dd7533
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
|
@ -29,6 +30,7 @@ import 'services/player.dart';
|
||||||
import 'widgets/main_menu.dart';
|
import 'widgets/main_menu.dart';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
|
if (kReleaseMode) {
|
||||||
await SentryFlutter.init(
|
await SentryFlutter.init(
|
||||||
(options) {
|
(options) {
|
||||||
options.dsn =
|
options.dsn =
|
||||||
|
@ -36,6 +38,9 @@ Future<void> main() async {
|
||||||
},
|
},
|
||||||
appRunner: () => runApp(SanmillApp()),
|
appRunner: () => runApp(SanmillApp()),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
runApp(SanmillApp());
|
||||||
|
}
|
||||||
|
|
||||||
SystemChrome.setPreferredOrientations(
|
SystemChrome.setPreferredOrientations(
|
||||||
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown],
|
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown],
|
||||||
|
|
Loading…
Reference in New Issue