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 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
@ -29,6 +30,7 @@ import 'services/player.dart';
|
|||
import 'widgets/main_menu.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
if (kReleaseMode) {
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn =
|
||||
|
@ -36,6 +38,9 @@ Future<void> main() async {
|
|||
},
|
||||
appRunner: () => runApp(SanmillApp()),
|
||||
);
|
||||
} else {
|
||||
runApp(SanmillApp());
|
||||
}
|
||||
|
||||
SystemChrome.setPreferredOrientations(
|
||||
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown],
|
||||
|
|
Loading…
Reference in New Issue