1,修复非首次进入APP也会显示隐私协议框问题
2,高级功能点击购买直接进入高级功能购买网页而非shop页面 3,解决授权管理员列表的管理员应提示要开高级功能否则不可进入管理员详情
This commit is contained in:
parent
93cbbb7ae7
commit
e8458be2c6
@ -4,6 +4,7 @@ import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdminListEntity.dart';
|
||||
import 'package:star_lock/tools/noData.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
|
||||
import '../../../../../appRouters.dart';
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
@ -23,14 +24,15 @@ class AuthorizedAdministratorListPage extends StatefulWidget {
|
||||
_AuthorizedAdministratorListPageState();
|
||||
}
|
||||
|
||||
class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministratorListPage> {
|
||||
class _AuthorizedAdministratorListPageState
|
||||
extends State<AuthorizedAdministratorListPage> {
|
||||
final logic = Get.put(AuthorizedAdministratorListLogic());
|
||||
final state = Get.find<AuthorizedAdministratorListLogic>().state;
|
||||
|
||||
Future<void> getHttpData() async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.mockNetworkDataRequest().then((AuthorizedAdminListEntity value){
|
||||
logic.mockNetworkDataRequest().then((AuthorizedAdminListEntity value) {
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
@ -60,7 +62,9 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
||||
),
|
||||
onPressed: () {
|
||||
// 处理操作按钮的点击事件
|
||||
Navigator.pushNamed(context, Routers.addAuthorizedAdministratorPage).then((value) {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.addAuthorizedAdministratorPage)
|
||||
.then((value) {
|
||||
setState(() {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
@ -71,119 +75,98 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
||||
],
|
||||
),
|
||||
body: EasyRefreshTool(
|
||||
onRefresh: (){
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
},
|
||||
onLoad: (){
|
||||
getHttpData();
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
// _searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
],
|
||||
)),
|
||||
onRefresh: () {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
},
|
||||
onLoad: () {
|
||||
getHttpData();
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
// _searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
// Widget _searchWidget() {
|
||||
// return Container(
|
||||
// height: 60.h,
|
||||
// margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
// child: TextField(
|
||||
// //输入框一行
|
||||
// maxLines: 1,
|
||||
// // controller: _controller,
|
||||
// autofocus: false,
|
||||
//
|
||||
// decoration: InputDecoration(
|
||||
// //输入里面输入文字内边距设置
|
||||
// contentPadding: const EdgeInsets.only(
|
||||
// top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
// hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
// hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
// //不需要输入框下划线
|
||||
// border: InputBorder.none,
|
||||
// //左边图标设置
|
||||
// icon: Padding(
|
||||
// padding: EdgeInsets.only(
|
||||
// top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
// child: Image.asset(
|
||||
// 'images/main/icon_main_search.png',
|
||||
// width: 40.w,
|
||||
// height: 40.w,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
Widget _buildMainUI() {
|
||||
return Obx(() => state.itemDataList.value.isEmpty
|
||||
? NoData(noDataHeight: 1.sh - ScreenUtil().statusBarHeight - ScreenUtil().bottomBarHeight - 190.h - 64.h)
|
||||
? NoData(
|
||||
noDataHeight: 1.sh -
|
||||
ScreenUtil().statusBarHeight -
|
||||
ScreenUtil().bottomBarHeight -
|
||||
190.h -
|
||||
64.h)
|
||||
: SlidableAutoCloseBehavior(
|
||||
child: ListView.separated(
|
||||
itemCount: state.itemDataList.value.length,
|
||||
itemBuilder: (c, index) {
|
||||
AuthorizedAdminListItem authorizedAdminListItem = state.itemDataList.value[index];
|
||||
child: ListView.separated(
|
||||
itemCount: state.itemDataList.value.length,
|
||||
itemBuilder: (c, index) {
|
||||
AuthorizedAdminListItem authorizedAdminListItem =
|
||||
state.itemDataList.value[index];
|
||||
|
||||
return Slidable(
|
||||
key:ValueKey(authorizedAdminListItem.uid),
|
||||
endActionPane: ActionPane(
|
||||
extentRatio: 0.2,
|
||||
motion: const ScrollMotion(),
|
||||
children: [
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context){
|
||||
ShowTipView().showDeleteAdministratorIsHaveAllDataDialog('同时删除其发送的所有钥匙,钥匙删除后不能恢复', (isAllData) {
|
||||
logic.deleteAdministratorRequest(authorizedAdminListItem.uid.toString(), isAllData ? 1 : 0);
|
||||
});
|
||||
},
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
label: '删除',
|
||||
padding: EdgeInsets.only(left: 5.w, right: 5.w),
|
||||
),
|
||||
],
|
||||
return Slidable(
|
||||
key: ValueKey(authorizedAdminListItem.uid),
|
||||
endActionPane: ActionPane(
|
||||
extentRatio: 0.2,
|
||||
motion: const ScrollMotion(),
|
||||
children: [
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
ShowTipView()
|
||||
.showDeleteAdministratorIsHaveAllDataDialog(
|
||||
'同时删除其发送的所有钥匙,钥匙删除后不能恢复', (isAllData) {
|
||||
logic.deleteAdministratorRequest(
|
||||
authorizedAdminListItem.uid.toString(),
|
||||
isAllData ? 1 : 0);
|
||||
});
|
||||
},
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
label: '删除',
|
||||
padding: EdgeInsets.only(left: 5.w, right: 5.w),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: _electronicKeyItem(authorizedAdminListItem),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider(
|
||||
height: 1,
|
||||
color: AppColors.greyLineColor,
|
||||
);
|
||||
},
|
||||
),
|
||||
child: _electronicKeyItem(authorizedAdminListItem),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider(
|
||||
height: 1,
|
||||
color: AppColors.greyLineColor,
|
||||
);
|
||||
},
|
||||
),
|
||||
));
|
||||
));
|
||||
}
|
||||
|
||||
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, Routers.administratorDetailsPage, arguments: {'itemData': itemData}).then((value) {
|
||||
setState(() {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
onTap: () async {
|
||||
//高级功能
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == true) {
|
||||
Get.toNamed(Routers.administratorDetailsPage,
|
||||
arguments: {'itemData': itemData})?.then((value) {
|
||||
setState(() {
|
||||
logic.pageNo = 1;
|
||||
getHttpData();
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ShowCupertinoAlertView().advancedFeatureAlert();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
color: Colors.white,
|
||||
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
// decoration: const BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.w),
|
||||
// ),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset('images/controls_user.png', width: 60.w, height: 60.w),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
@ -193,24 +176,18 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// Text(
|
||||
// itemData.name ?? '',
|
||||
// style: TextStyle(
|
||||
// fontSize: 24.sp, color: AppColors.blackColor),
|
||||
// ),
|
||||
SizedBox(
|
||||
width: 1.sw - 110.w - 100.w,
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
itemData.name ?? '',
|
||||
child: Text(itemData.name ?? '',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor)
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: AppColors.blackColor)),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -243,5 +220,4 @@ class _AuthorizedAdministratorListPageState extends State<AuthorizedAdministrato
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElectronicKey/expireLockList_entity.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet/weChatQRCodeEntity.dart';
|
||||
import 'package:star_lock/tools/appFirstEnterHandle.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/xs_jPhush.dart';
|
||||
import 'package:star_lock/versionUndate/versionUndate_entity.dart';
|
||||
@ -85,7 +85,7 @@ class MineSetLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
void showQRImageAlert(String qrCodeUrl, BuildContext widgetContext) {
|
||||
AppFirstEnterHandle().showQRImageAlert(widgetContext, qrCodeUrl);
|
||||
ShowCupertinoAlertView().showQRImageAlert(widgetContext, qrCodeUrl);
|
||||
}
|
||||
|
||||
//退出登录请求
|
||||
|
||||
@ -23,8 +23,8 @@ class AdvancedFeaturesWebLogic extends BaseGetXController {
|
||||
AdvancedFeaturesWebEntity entity =
|
||||
await ApiRepository.to.getServicePackageBuyUrl();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.vipBuyUrl.value = state.isShop.value == true
|
||||
? entity.data!.shopList!
|
||||
state.vipBuyUrl.value = state.isVipShop.value == true
|
||||
? entity.data!.vipBuyUrl!
|
||||
: entity.data!.cloudauthBuyUrl!;
|
||||
state.vipBuyWebView.setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
|
||||
@ -32,8 +32,9 @@ class _AdvancedFeaturesWebPageState extends State<AdvancedFeaturesWebPage> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFFFFFFF),
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
logic.state.isShop.value == true ? '高级功能'.tr : '实名认证'.tr,
|
||||
barTitle: logic.state.isVipShop.value == true
|
||||
? '高级功能'.tr
|
||||
: '实名认证'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
backAction: () => logic.canGoBack(false),
|
||||
|
||||
@ -8,7 +8,7 @@ class AdvancedFeaturesWebState {
|
||||
var webProgress = 0.0.obs;
|
||||
bool allowReturn = true;
|
||||
late WebViewController vipBuyWebView = initWebViewController();
|
||||
var isShop = true.obs; //是否为高级功能购买页面
|
||||
var isVipShop = true.obs; //是否为高级功能购买页面
|
||||
bool canGoBack = false;
|
||||
|
||||
//初始化webView控制器
|
||||
@ -23,7 +23,7 @@ class AdvancedFeaturesWebState {
|
||||
AdvancedFeaturesWebState() {
|
||||
Map map = Get.arguments;
|
||||
if (map['isShop'] != null) {
|
||||
isShop.value = map['isShop'];
|
||||
isVipShop.value = map['isShop'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/flavors.dart';
|
||||
import 'package:star_lock/login/login/starLock_login_page.dart';
|
||||
import 'package:star_lock/login/login/starLock_login_xhj_page.dart';
|
||||
@ -31,7 +30,6 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AppFirstEnterHandle().getAppFirstEnter(context, isAgreePrivacy);
|
||||
getAgreePrivacyShowUpdate();
|
||||
|
||||
return FutureBuilder<bool>(
|
||||
@ -48,6 +46,8 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
||||
xhjCall: () => const StarLockMainXHJPage());
|
||||
} else {
|
||||
// 如果用户未登录,返回登录页面
|
||||
AppFirstEnterHandle().getAppFirstEnter(isAgreePrivacy);
|
||||
|
||||
return F.sw(
|
||||
defaultCall: () => const StarLockLoginPage(),
|
||||
xhjCall: () => const StarLockLoginXHJPage());
|
||||
@ -73,7 +73,7 @@ class _StarLockApplicationState extends State<StarLockApplication> {
|
||||
Future<void> getAgreePrivacyShowUpdate() async {
|
||||
final data = await Storage.getString(isAgreePrivacy);
|
||||
if (data == isAgreePrivacy) {
|
||||
AppFirstEnterHandle().getAppFirstEnter(context, isShowUpdateVersion);
|
||||
AppFirstEnterHandle().getAppFirstEnter(isShowUpdateVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ import 'dart:io';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
@ -14,24 +13,24 @@ import 'package:star_lock/tools/storage.dart';
|
||||
import '../versionUndate/versionUndateTool.dart';
|
||||
|
||||
class AppFirstEnterHandle {
|
||||
Future getAppFirstEnter(BuildContext widgetContext, String flagStr) async {
|
||||
Future getAppFirstEnter(String flagStr) async {
|
||||
var getFlag = await Storage.getString(flagStr);
|
||||
switch (flagStr) {
|
||||
case isAgreePrivacy: // 隐私协议
|
||||
{
|
||||
if (getFlag != isAgreePrivacy) {
|
||||
showPrivacyAgreementAlert(widgetContext);
|
||||
showPrivacyAgreementAlert();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case isAgreePosition: // 位置权限
|
||||
{
|
||||
if (getFlag != isAgreePosition) showPositionAlert(widgetContext);
|
||||
if (getFlag != isAgreePosition) showPositionAlert();
|
||||
}
|
||||
break;
|
||||
case isAgreeCamera: // 相机权限
|
||||
{
|
||||
if (getFlag != isAgreeCamera) showCameraAlert(widgetContext);
|
||||
if (getFlag != isAgreeCamera) showCameraAlert();
|
||||
}
|
||||
break;
|
||||
case isShowUpdateVersion: // 版本更新
|
||||
@ -45,9 +44,9 @@ class AppFirstEnterHandle {
|
||||
}
|
||||
|
||||
//隐私协议弹窗
|
||||
void showPrivacyAgreementAlert(BuildContext widgetContext) {
|
||||
void showPrivacyAgreementAlert() {
|
||||
showCupertinoDialog(
|
||||
context: widgetContext,
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
@ -118,7 +117,7 @@ class AppFirstEnterHandle {
|
||||
onPressed: () {
|
||||
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
||||
Navigator.of(context).pop();
|
||||
getAppFirstEnter(context, isShowUpdateVersion);
|
||||
getAppFirstEnter(isShowUpdateVersion);
|
||||
},
|
||||
),
|
||||
],
|
||||
@ -188,7 +187,7 @@ class AppFirstEnterHandle {
|
||||
onPressed: () {
|
||||
Storage.setString(isAgreePrivacy, isAgreePrivacy);
|
||||
Navigator.of(context).pop();
|
||||
getAppFirstEnter(context, isShowUpdateVersion);
|
||||
getAppFirstEnter(isShowUpdateVersion);
|
||||
},
|
||||
),
|
||||
],
|
||||
@ -196,9 +195,9 @@ class AppFirstEnterHandle {
|
||||
}
|
||||
|
||||
//位置权限弹窗
|
||||
void showPositionAlert(BuildContext widgetContext) {
|
||||
void showPositionAlert() {
|
||||
showCupertinoDialog(
|
||||
context: widgetContext,
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
@ -226,9 +225,9 @@ class AppFirstEnterHandle {
|
||||
}
|
||||
|
||||
//相机权限弹窗
|
||||
void showCameraAlert(BuildContext widgetContext) {
|
||||
void showCameraAlert() {
|
||||
showCupertinoDialog(
|
||||
context: widgetContext,
|
||||
context: Get.context!,
|
||||
builder: (context) {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
@ -255,55 +254,6 @@ class AppFirstEnterHandle {
|
||||
);
|
||||
}
|
||||
|
||||
//微信公众号二维码弹窗
|
||||
void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) {
|
||||
showCupertinoModalPopup(
|
||||
context: widgetContext,
|
||||
builder: (context) {
|
||||
return CupertinoActionSheet(
|
||||
actions: [
|
||||
Container(
|
||||
color: Colors.white, // 设置底色为白色
|
||||
child: CupertinoActionSheetAction(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(0),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
),
|
||||
Image.network(
|
||||
qrCodeUrl,
|
||||
width: 400.w,
|
||||
height: 400.w,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||
child: Text(
|
||||
'开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, color: Colors.black),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// _launchURL(String url) async {
|
||||
// if (await canLaunchUrl(Uri.parse(url))) {
|
||||
// await launchUrl(Uri.parse(url));
|
||||
|
||||
@ -8,6 +8,55 @@ import 'package:star_lock/app_settings/app_colors.dart';
|
||||
typedef AuthInfoCallback = void Function(String idCard, String name);
|
||||
|
||||
class ShowCupertinoAlertView {
|
||||
//微信公众号二维码弹窗
|
||||
void showQRImageAlert(BuildContext widgetContext, String qrCodeUrl) {
|
||||
showCupertinoModalPopup(
|
||||
context: widgetContext,
|
||||
builder: (context) {
|
||||
return CupertinoActionSheet(
|
||||
actions: [
|
||||
Container(
|
||||
color: Colors.white, // 设置底色为白色
|
||||
child: CupertinoActionSheetAction(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(0),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
),
|
||||
Image.network(
|
||||
qrCodeUrl,
|
||||
width: 400.w,
|
||||
height: 400.w,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||
child: Text(
|
||||
'开启微信接收报警消息需要先关注斯凯智能锁微信公众号,请保存二维码并使用微信扫一扫设置'.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, color: Colors.black),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 60.h,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
//高级功能弹窗
|
||||
void advancedFeatureAlert() {
|
||||
showCupertinoDialog(
|
||||
|
||||
@ -26,7 +26,7 @@ const saveIsVip = "saveIsVip"; //是否是VIP
|
||||
|
||||
const saveUserLoginData = "userLoginData";
|
||||
const saveLockMainListData = "lockMainListData";
|
||||
const isOpenDeBug = "isOpenDeBug";//是否打开 debug
|
||||
const isOpenDeBug = "isOpenDeBug"; //是否打开 debug
|
||||
|
||||
class Storage {
|
||||
Storage._internal();
|
||||
@ -145,6 +145,12 @@ class Storage {
|
||||
static Future<void> clearAll() async {
|
||||
SharedPreferences sp = await SharedPreferences.getInstance();
|
||||
sp.clear();
|
||||
|
||||
// 重新设置需要保留的数据
|
||||
if (isAgreePrivacy != null) {
|
||||
//退出登录不清除隐私协议同意状态
|
||||
await setString(isAgreePrivacy, isAgreePrivacy);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<String?> getUid() async {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user