根据平台判断是否需要注释掉上架相关

This commit is contained in:
Daisy 2024-03-09 13:51:42 +08:00
parent ad8cdc279b
commit 9648e8dba9
4 changed files with 65 additions and 47 deletions

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../appRouters.dart';
import '../../app_settings/app_colors.dart';
@ -199,21 +200,24 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
width: 10.sp,
)),
// Google暂时屏蔽
// GestureDetector(
// child: SizedBox(
// // width: 150.w,
// height: 50.h,
// // color: Colors.red,
// child: Center(
// child: Text('演示模式',
// style: TextStyle(
// fontSize: 22.sp, color: AppColors.mainColor)),
// ),
// ),
// onTap: () {
// Get.toNamed(Routers.demoModeLockDetailPage);
// },
// )
F.appFlavor == Flavor.sky
? Container()
: GestureDetector(
child: SizedBox(
// width: 150.w,
height: 50.h,
// color: Colors.red,
child: Center(
child: Text('演示模式',
style: TextStyle(
fontSize: 22.sp,
color: AppColors.mainColor)),
),
),
onTap: () {
Get.toNamed(Routers.demoModeLockDetailPage);
},
)
],
),
],

View File

@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/translations/trans_lib.dart';
import 'app.dart';
import 'package:star_lock/tools/device_info_service.dart';
@ -36,7 +37,11 @@ Future _initTranslation() async => TranslationLoader.loadTranslation(
Future _setCommonServices() async {
await Get.putAsync(() => StoreService().init());
await Get.putAsync(() => PlatformInfoService().init());
//
// await Get.putAsync(() => DeviceInfoService().init());
if (F.appFlavor == Flavor.sky) {
//
// await Get.putAsync(() => DeviceInfoService().init());
} else {
await Get.putAsync(() => DeviceInfoService().init());
}
// Get.log(PlatformInfoService.to.info.version);
}

View File

@ -199,12 +199,14 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
height: 160.h,
),
// Google暂时屏蔽
// SubmitBtn(
// btnName: '演示模式',
// onClick: () {
// Get.toNamed(Routers.demoModeLockDetailPage);
// },
// )
F.appFlavor == Flavor.sky
? Container()
: SubmitBtn(
btnName: '演示模式',
onClick: () {
Get.toNamed(Routers.demoModeLockDetailPage);
},
)
],
),
],

View File

@ -2,6 +2,7 @@ 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/flavors.dart';
import 'package:star_lock/mine/mineSet/mineSet/mineSet_logic.dart';
import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart';
@ -185,30 +186,36 @@ class _MineSetPageState extends State<MineSetPage> {
height: 10.h,
),
//
// CommonItem(
// leftTitel: "Amazon Alexa",
// rightTitle: "",
// isHaveLine: true,
// isHaveDirection: true,
// action: () {
// logic.showToast("功能暂未开放");
// }),
// CommonItem(
// leftTitel: "Google Home",
// rightTitle: "",
// isHaveLine: true,
// isHaveDirection: true,
// action: () {
// logic.showToast("功能暂未开放");
// }),
// CommonItem(
// leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
// rightTitle: "",
// isHaveLine: false,
// isHaveDirection: true,
// action: () {
// logic.showToast("功能暂未开放");
// }),
F.appFlavor == Flavor.sky
? Container()
: CommonItem(
leftTitel: "Amazon Alexa",
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
logic.showToast("功能暂未开放");
}),
F.appFlavor == Flavor.sky
? Container()
: CommonItem(
leftTitel: "Google Home",
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
logic.showToast("功能暂未开放");
}),
F.appFlavor == Flavor.sky
? Container()
: CommonItem(
leftTitel: TranslationLoader.lanKeys!.xiaomiIOTPlatform!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
logic.showToast("功能暂未开放");
}),
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
//
// }),