xhj布局高级功能vip状态更新检查完善
This commit is contained in:
parent
a524642a88
commit
282bae9f7c
@ -19,11 +19,14 @@ class MassSendLockGroupListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getVipStatus() async {
|
||||||
|
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||||
|
state.isVip.value = isVip ?? false;
|
||||||
|
state.isVip.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onReady() async {
|
Future<void> onReady() async {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
var isVip = await Storage.getBool(saveIsVip);
|
|
||||||
state.isVip.value = isVip ?? false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,9 +27,10 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
Get.find<MassSendLockGroupListLogic>().state;
|
Get.find<MassSendLockGroupListLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
logic.mockNetworkDataRequest();
|
logic.mockNetworkDataRequest();
|
||||||
|
logic.getVipStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -138,8 +139,7 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
currentIndex: index,
|
currentIndex: index,
|
||||||
lockListByGroup: lockItemList,
|
lockListByGroup: lockItemList,
|
||||||
isVip: state.isVip.value,
|
isVip: state.isVip.value,
|
||||||
isShowBtn: true,
|
isShowBtn: true, selectLockAction: (selectIndex, selectLockId) {
|
||||||
selectLockAction: (selectIndex, selectLockId) {
|
|
||||||
LockListItem lockItem = lockItemList[selectIndex];
|
LockListItem lockItem = lockItemList[selectIndex];
|
||||||
lockItem.isChecked = !lockItem.isChecked;
|
lockItem.isChecked = !lockItem.isChecked;
|
||||||
if (lockItem.isChecked) {
|
if (lockItem.isChecked) {
|
||||||
|
|||||||
@ -18,15 +18,17 @@ class MassSendReceiverLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getVipStatus() async {
|
||||||
|
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||||
|
state.isVip.value = isVip ?? false;
|
||||||
|
state.isVip.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onReady() async {
|
Future<void> onReady() async {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
final LockUserItemData data = LockUserItemData();
|
final LockUserItemData data = LockUserItemData();
|
||||||
state.lockUserList.add(data);
|
state.lockUserList.add(data);
|
||||||
|
|
||||||
final bool? isVip = await Storage.getBool(saveIsVip);
|
|
||||||
state.isVip.value = isVip ?? false;
|
|
||||||
state.isVip.refresh();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/ma
|
|||||||
import 'package:star_lock/tools/commonItem.dart';
|
import 'package:star_lock/tools/commonItem.dart';
|
||||||
import 'package:star_lock/tools/regexp_tool.dart';
|
import 'package:star_lock/tools/regexp_tool.dart';
|
||||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||||
|
import 'package:star_lock/tools/storage.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
class MassSendReceiverPage extends StatefulWidget {
|
class MassSendReceiverPage extends StatefulWidget {
|
||||||
@ -27,6 +28,13 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
|||||||
final MassSendReceiverLogic logic = Get.put(MassSendReceiverLogic());
|
final MassSendReceiverLogic logic = Get.put(MassSendReceiverLogic());
|
||||||
final MassSendReceiverState state = Get.find<MassSendReceiverLogic>().state;
|
final MassSendReceiverState state = Get.find<MassSendReceiverLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
logic.getVipStatus();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|||||||
@ -42,11 +42,14 @@ class GroupEditLockLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getVipStatus() async {
|
||||||
|
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||||
|
state.isVip.value = isVip ?? false;
|
||||||
|
state.isVip.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
onReady() async {
|
onReady() async {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
var isVip = await Storage.getBool(saveIsVip);
|
|
||||||
state.isVip.value = isVip ?? false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,13 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
|||||||
final GroupEditLockLogic logic = Get.put(GroupEditLockLogic());
|
final GroupEditLockLogic logic = Get.put(GroupEditLockLogic());
|
||||||
final GroupEditLockState state = Get.find<GroupEditLockLogic>().state;
|
final GroupEditLockState state = Get.find<GroupEditLockLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
logic.getVipStatus();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -125,15 +132,13 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 1.sw - 80.w - 75.w,
|
width: 1.sw - 80.w - 75.w,
|
||||||
child: Text(
|
child: Text(
|
||||||
itemData.lockAlias ?? '',
|
itemData.lockAlias ?? '',
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 24.sp),
|
style: TextStyle(fontSize: 24.sp),
|
||||||
)
|
))),
|
||||||
)
|
|
||||||
),
|
|
||||||
// Text(
|
// Text(
|
||||||
// itemData.lockAlias ?? '',
|
// itemData.lockAlias ?? '',
|
||||||
// style: TextStyle(fontSize: 24.sp),
|
// style: TextStyle(fontSize: 24.sp),
|
||||||
|
|||||||
@ -107,10 +107,14 @@ class CustomSMSTemplateListLogic extends BaseGetXController {
|
|||||||
textSpans.add(TextSpan(text: text, style: style));
|
textSpans.add(TextSpan(text: text, style: style));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> getVipStatus() async {
|
||||||
|
final bool? isVip = await Storage.getBool(saveIsVip);
|
||||||
|
state.isVip.value = isVip ?? false;
|
||||||
|
state.isVip.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> onReady() async {
|
Future<void> onReady() async {
|
||||||
super.onReady();
|
super.onReady();
|
||||||
var isVip = await Storage.getBool(saveIsVip);
|
|
||||||
state.isVip.value = isVip ?? false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ class _CustomSMSTemplateListPageState extends State<CustomSMSTemplateListPage> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
logic.getSMSTemplateListRequest(isRefresh: true);
|
logic.getSMSTemplateListRequest(isRefresh: true);
|
||||||
|
logic.getVipStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user