From faa65dc67b7835bb7bc215f69abc33d005e4c729 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Sat, 2 Apr 2022 17:15:44 +0800 Subject: [PATCH] =?UTF-8?q?hw=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 2 +- lib/main_page.dart | 3 ++- lib/setting/logout_ing.dart | 6 +++--- lib/setting/setting_page.dart | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index de3dea5b..e2d69ce3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -125,7 +125,7 @@ void main() async { // FlutterBugly.init(androidAppId: "204f207673",iOSAppId: "8bb92ba0f6"); } -final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); +// final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); diff --git a/lib/main_page.dart b/lib/main_page.dart index 96ae17e0..f821f904 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -139,8 +139,9 @@ class _MainPage extends State with WidgetsBindingObserver { queryUserInfo(); } - + final XgFlutterPlugin xgFlutterPlugin = XgFlutterPlugin(); initSdk() async { + xgFlutterPlugin.stopXg(); ///ios 调用startXg前需要调用此方法 xgFlutterPlugin.configureClusterDomainName("tpns.sh.tencent.com"); xgFlutterPlugin.setEnableDebug(true); diff --git a/lib/setting/logout_ing.dart b/lib/setting/logout_ing.dart index 66f0935a..4b43f5fc 100644 --- a/lib/setting/logout_ing.dart +++ b/lib/setting/logout_ing.dart @@ -452,8 +452,8 @@ class _LogoutIng extends State { Navigator.of(context) .pushNamedAndRemoveUntil('/router/login_page', (route) => false); - if (xgFlutterPlugin != null) { - xgFlutterPlugin.stopXg(); - } + // if (xgFlutterPlugin != null) { + // xgFlutterPlugin.stopXg(); + // } } } diff --git a/lib/setting/setting_page.dart b/lib/setting/setting_page.dart index 314ed979..3af86255 100644 --- a/lib/setting/setting_page.dart +++ b/lib/setting/setting_page.dart @@ -243,9 +243,9 @@ class _SettingPage extends State { Navigator.of(context) .pushNamedAndRemoveUntil('/router/login_page', (route) => false); - if (xgFlutterPlugin != null) { - xgFlutterPlugin.stopXg(); - } + // if (xgFlutterPlugin != null) { + // xgFlutterPlugin.stopXg(); + // } } Widget settingItem(left, right) {