89 lines
2.6 KiB
Dart
89 lines
2.6 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,
|
|
arguments: {'isShop': true});
|
|
},
|
|
),
|
|
],
|
|
);
|
|
});
|
|
}
|
|
|
|
//高级功能顶部提示框
|
|
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, arguments: {
|
|
'isShop': true,
|
|
});
|
|
},
|
|
child: Text(
|
|
'去开通'.tr,
|
|
style: TextStyle(color: Colors.white, fontSize: 22.sp),
|
|
)),
|
|
),
|
|
Expanded(
|
|
child: SizedBox(
|
|
width: 2.w,
|
|
))
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|