diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json index 6d13080..8cfc959 100644 --- a/.dart_tool/package_config.json +++ b/.dart_tool/package_config.json @@ -135,7 +135,7 @@ }, { "name": "flutter_alibc", - "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/zhiying_flutter_alibc-9786cccfb44cd4b38f2ca3f1ff1dc139c4e09d61/", + "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/zhiying_flutter_alibc-f0974bf1ee4e647c00f749707017841dc3685436/", "packageUri": "lib/", "languageVersion": "2.1" }, @@ -363,7 +363,7 @@ }, { "name": "secverify", - "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/secverify-1.0.2", + "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/secverify-c8cf0485ed961de40dc2b514b7402c3e61916d48/", "packageUri": "lib/", "languageVersion": "2.1" }, @@ -537,7 +537,7 @@ }, { "name": "webview_flutter", - "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24", + "rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.7", "packageUri": "lib/", "languageVersion": "2.7" }, @@ -560,7 +560,7 @@ "languageVersion": "2.1" } ], - "generated": "2021-02-09T02:05:40.877904Z", + "generated": "2021-03-01T06:48:08.229099Z", "generator": "pub", "generatorVersion": "2.10.1" } diff --git a/lib/models/user/user_info_model_notifier.dart b/lib/models/user/user_info_model_notifier.dart index 31ea5c2..e705bde 100644 --- a/lib/models/user/user_info_model_notifier.dart +++ b/lib/models/user/user_info_model_notifier.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; @@ -16,6 +17,7 @@ import 'package:zhiying_comm/util/shared_prefe_util.dart'; class UserInfoNotifier with ChangeNotifier { /// 用户信息 static UserInfoModel _userInfo; + static bool reFresh=false; static UserInfoModel get staitcUserInfo { return _userInfo; @@ -66,16 +68,22 @@ class UserInfoNotifier with ChangeNotifier { void unLogin() async { _userInfo = null; // 清除缓存数据 - await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_TOKEN, null); - await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_MOBILE, null); - await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_USER_INFO, null); + await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_TOKEN, ''); + await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_MOBILE, ''); + await SharedPreferencesUtil.setStringValue(GlobalConfig.SHARED_KEY_USER_INFO, ''); // 退出淘宝登录 FlutterAlibc.loginOut(); // 退出QQ登录 MobUtil.cancelQQAuth(); // 退出微信登录 MobUtil.cancelWeChatAuth(); - EventUtil.instance.fire(LogOut()); + if(!reFresh){ + reFresh=true; + Timer(Duration(milliseconds: 1000), (){ + EventUtil.instance.fire(LogOut()); + }); + } + notifyListeners(); } diff --git a/lib/zhiying_comm.dart b/lib/zhiying_comm.dart index 4387fdf..dd7c282 100644 --- a/lib/zhiying_comm.dart +++ b/lib/zhiying_comm.dart @@ -43,4 +43,5 @@ export 'util/event_util/event_util.dart'; export 'util/event_util/login_success_event.dart'; export 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart'; export 'package:save_image/save_image.dart'; +export 'package:zhiying_comm/pages/login_page/login_style_util.dart';