import 'package:flutter/cupertino.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); }, ), ], ); }); } }