app-starlock/star_lock/lib/tools/advancedFunctionHandle.dart
Daisy 6d186ec0a4 1,登录接口新增是否VIP标识
2,群发电子钥匙代码结构重构及高级功能相关逻辑处理
3,选择锁分组、用户管理高级功能相关逻辑增加
4,新增公用高级功能顶部提示框组件
2024-05-03 17:53:15 +08:00

86 lines
2.5 KiB
Dart

import 'package:flutter/cupertino.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';
class AdvancedFunctionHandle {
//高级功能弹窗
void advancedFeatureAlert() {
showCupertinoDialog(
context: Get.context!,
builder: (context) {
return CupertinoAlertDialog(
title: Container(
margin: EdgeInsets.only(bottom: 20.h),
child: Image.asset(
'images/icon_gift.png',
width: 50.w,
height: 50.w,
),
),
content: Text('该功能是高级功能,请开通后再使用'.tr),
actions: [
CupertinoDialogAction(
child: Text(
'取消'.tr,
style: TextStyle(color: AppColors.mainColor),
),
onPressed: () {
Get.back();
},
),
CupertinoDialogAction(
child: Text(
'去开通'.tr,
style: TextStyle(color: AppColors.mainColor),
),
onPressed: () async {
Get.toNamed(Routers.advancedFeaturesWebPage);
},
),
],
);
});
}
//高级功能顶部提示框
Widget topTipsAdvancedFeatures(String tipsText) {
return Container(
color: AppColors.vipFeatureBgColor,
padding: EdgeInsets.only(left: 20.w),
height: 80.h,
child: Row(
children: [
Text(tipsText,
style: TextStyle(
color: AppColors.vipFeatureBtnTextColor, fontSize: 22.sp)),
SizedBox(
width: 10.w,
),
SizedBox(
width: 146.w,
height: 46.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.vipFeatureBtnBgColor,
),
onPressed: () {
Get.toNamed(Routers.advancedFeaturesWebPage);
},
child: Text(
'去开通'.tr,
style: TextStyle(color: Colors.white, fontSize: 22.sp),
)),
),
Expanded(
child: SizedBox(
width: 2.w,
))
],
),
);
}
}