Skip to content

Commit

Permalink
sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed Nov 10, 2022
1 parent 4da1c84 commit 552eeb5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
60 changes: 31 additions & 29 deletions lib/src/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,36 @@ class MyApp extends StatelessWidget {

@override
Widget build(BuildContext context) {
return GetMaterialApp(
title: 'JHenTai',
theme: ThemeConfig.light,
darkTheme: ThemeConfig.dark,
themeMode: StyleSetting.themeMode.value,

localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('en', 'US'),
Locale('zh', 'CN'),
Locale('zh', 'TW'),
],
locale: StyleSetting.locale.value,
fallbackLocale: const Locale('en', 'US'),
translations: LocaleText(),

getPages: Routes.pages,
initialRoute: SecuritySetting.enableBiometricLock.isTrue ? Routes.lock : Routes.home,
navigatorObservers: [GetXRouterObserver(), SentryNavigatorObserver()],
builder: (context, child) => ScrollConfiguration(behavior: UIConfig.scrollBehaviourWithScrollBar, child: AppStateListener(child: child!)),

/// enable swipe back feature
popGesture: true,
onReady: onReady,
return SentryScreenshotWidget(
child: GetMaterialApp(
title: 'JHenTai',
theme: ThemeConfig.light,
darkTheme: ThemeConfig.dark,
themeMode: StyleSetting.themeMode.value,

localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('en', 'US'),
Locale('zh', 'CN'),
Locale('zh', 'TW'),
],
locale: StyleSetting.locale.value,
fallbackLocale: const Locale('en', 'US'),
translations: LocaleText(),

getPages: Routes.pages,
initialRoute: SecuritySetting.enableBiometricLock.isTrue ? Routes.lock : Routes.home,
navigatorObservers: [GetXRouterObserver(), SentryNavigatorObserver()],
builder: (context, child) => ScrollConfiguration(behavior: UIConfig.scrollBehaviourWithScrollBar, child: AppStateListener(child: child!)),

/// enable swipe back feature
popGesture: true,
onReady: onReady,
),
);
}
}
Expand Down Expand Up @@ -119,7 +121,7 @@ Future<void> init() async {

WidgetsFlutterBinding.ensureInitialized();

if (SentryConfig.dsn.isNotEmpty && !kDebugMode) {
if (SentryConfig.dsn.isNotEmpty) {
await SentryFlutter.init((options) => options.dsn = SentryConfig.dsn);
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1157,14 +1157,14 @@ packages:
name: sentry
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.9.1"
version: "6.15.1"
sentry_flutter:
dependency: "direct main"
description:
name: sentry_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.9.1"
version: "6.15.1"
share_plus:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies:
animate_do: ^2.1.0
share_plus: ^4.0.10
syncfusion_flutter_charts: ^20.2.36
sentry_flutter: ^6.9.1
sentry_flutter: 6.15.1
archive: ^3.3.1
image_size_getter:
git:
Expand Down

0 comments on commit 552eeb5

Please sign in to comment.