1,新增面容开锁相关界面
2,新增猫眼工作模式相关界面 3,新增开门方向设置界面 4,新增电机功率设置页面 5,部分图片补充
BIN
star_lock/images/mine/icon_mine_blueSelect.png
Normal file
|
After Width: | Height: | Size: 1004 B |
BIN
star_lock/images/mine/icon_mine_openDoorDir.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
star_lock/ios/Runner/img/bg.jpg
Executable file
|
After Width: | Height: | Size: 47 KiB |
BIN
star_lock/ios/Runner/img/logo.png
Executable file
|
After Width: | Height: | Size: 262 KiB |
BIN
star_lock/ios/Runner/img/logo2.png
Executable file
|
After Width: | Height: | Size: 47 KiB |
BIN
star_lock/ios/Runner/img/logo3.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
BIN
star_lock/ios/Runner/img/swicth_add_off.png
Executable file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
star_lock/ios/Runner/img/swicth_add_on.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
star_lock/ios/Runner/img/swicth_minus_off.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
star_lock/ios/Runner/img/swicth_minus_on.png
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
star_lock/ios/Runner/img/swicth_off.png
Executable file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
star_lock/ios/Runner/img/swicth_on.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
star_lock/ios/Runner/img/test.jpg
Executable file
|
After Width: | Height: | Size: 158 KiB |
BIN
star_lock/ios/Runner/img/thumb_on.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
||||||
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
||||||
@ -7,6 +8,10 @@ import 'package:star_lock/login/register/starLock_register_binding.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendReceiver/massSendReceiver_page.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/catEyeWorkMode/catEyeWorkMode_page.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/motorPower/motorPower_page.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/lcokSet/openDoorDirection/openDoorDirection_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
import 'package:star_lock/main/lockDetail/lockDetail/lockDetail_main_page.dart';
|
||||||
import 'package:star_lock/mine/about/webviewShow_page.dart';
|
import 'package:star_lock/mine/about/webviewShow_page.dart';
|
||||||
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
|
||||||
@ -337,6 +342,10 @@ abstract class Routers {
|
|||||||
static const demoModeLockDetailPage = '/DemoModeLockDetailPage'; // 演示模式锁详情页
|
static const demoModeLockDetailPage = '/DemoModeLockDetailPage'; // 演示模式锁详情页
|
||||||
static const demoModeLockSetPage = '/DemoModeLockSetPage'; // 演示模式锁设置页
|
static const demoModeLockSetPage = '/DemoModeLockSetPage'; // 演示模式锁设置页
|
||||||
static const addLockSeletCountryPage = '/AddLockSeletCountryPage'; // 演示模式锁设置页
|
static const addLockSeletCountryPage = '/AddLockSeletCountryPage'; // 演示模式锁设置页
|
||||||
|
static const faceUnlockPage = '/faceUnlockPage'; //面容开锁设置
|
||||||
|
static const motorPowerPage = '/motorPowerPage'; //电机功率设置
|
||||||
|
static const openDoorDirectionPage = '/openDoorDirectionPage'; //开门方向设置
|
||||||
|
static const catEyeWorkModePage = '/catEyeWorkModePage'; //猫眼工作模式
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -830,8 +839,22 @@ abstract class AppRouters {
|
|||||||
name: Routers.minePersonInfoViewSafetyProblemPage,
|
name: Routers.minePersonInfoViewSafetyProblemPage,
|
||||||
page: () => const MinePersonInfoViewSafetyProblemPage()),
|
page: () => const MinePersonInfoViewSafetyProblemPage()),
|
||||||
GetPage(name: Routers.webviewShowPage, page: () => const WebviewShowPage()),
|
GetPage(name: Routers.webviewShowPage, page: () => const WebviewShowPage()),
|
||||||
GetPage(name: Routers.demoModeLockSetPage, page: () => const DemoModeLockSetPage()),
|
GetPage(
|
||||||
GetPage(name: Routers.demoModeLockDetailPage, page: () => const DemoModeLockDetailPage()),
|
name: Routers.demoModeLockSetPage,
|
||||||
GetPage(name: Routers.addLockSeletCountryPage, page: () => const AddLockSeletCountryPage()),
|
page: () => const DemoModeLockSetPage()),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.demoModeLockDetailPage,
|
||||||
|
page: () => const DemoModeLockDetailPage()),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.addLockSeletCountryPage,
|
||||||
|
page: () => const AddLockSeletCountryPage()),
|
||||||
|
GetPage(name: Routers.faceUnlockPage, page: () => const FaceUnlockPage()),
|
||||||
|
GetPage(name: Routers.motorPowerPage, page: () => const MotorPowerPage()),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.openDoorDirectionPage,
|
||||||
|
page: () => const OpenDoorDirectionPage()),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.catEyeWorkModePage,
|
||||||
|
page: () => const CatEyeWorkModePage())
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,4 +122,6 @@ class AppColors {
|
|||||||
static const btnDisableColor = Color.fromRGBO(178, 178, 178, 1); //按钮不可用灰色
|
static const btnDisableColor = Color.fromRGBO(178, 178, 178, 1); //按钮不可用灰色
|
||||||
static const toBeReceiveBgColor = Color.fromRGBO(246, 203, 203, 1); //待接收红色背景
|
static const toBeReceiveBgColor = Color.fromRGBO(246, 203, 203, 1); //待接收红色背景
|
||||||
static const expireTextBgColor = Color.fromRGBO(253, 166, 8, 1); //即将到期时间字体背景色
|
static const expireTextBgColor = Color.fromRGBO(253, 166, 8, 1); //即将到期时间字体背景色
|
||||||
|
static const blueTextTipsColor = Color.fromRGBO(0, 113, 255, 1); //蓝色字体tips
|
||||||
|
static const blueViewBgColor = Color.fromRGBO(223, 237, 254, 1); //蓝色背景板
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,125 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class CatEyeWorkModePage extends StatefulWidget {
|
||||||
|
const CatEyeWorkModePage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CatEyeWorkModePage> createState() => _CatEyeWorkModePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
||||||
|
bool isCheck = false;
|
||||||
|
List boolList = [true, false, false, false];
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '猫眼工作模式',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
),
|
||||||
|
_buildTipsView(
|
||||||
|
'省电模式:\n',
|
||||||
|
'适合门口较为安全的环境。\n仅发生特定事件才录像,并可查看实时画面。\n一般情况下,满电可使用7-8个月',
|
||||||
|
0,
|
||||||
|
boolList[0]),
|
||||||
|
SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
),
|
||||||
|
_buildTipsView(
|
||||||
|
'逗留抓拍模式:\n',
|
||||||
|
'有人逗留或发生特定事件才录像,可随时查看\n实时画面。\n一般情况下,满电可使用5~6个月。',
|
||||||
|
1,
|
||||||
|
boolList[1]),
|
||||||
|
SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
),
|
||||||
|
_buildTipsView(
|
||||||
|
'实时监控模式:\n',
|
||||||
|
'适合门口人员复杂、较不安全的环境。\n有人出现就录像,可随时查看实时画面。\n一般情况下,满电可使用2~4个月。',
|
||||||
|
2,
|
||||||
|
boolList[2]),
|
||||||
|
SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
),
|
||||||
|
_buildTipsView('自定义模式:\n', '根据您家门口实际情况设置录像和实时画面功能。\n可使用时长由具体设置决定。',
|
||||||
|
3, boolList[3])
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTipsView(
|
||||||
|
String titleStr, String subTitle, int clickIndex, bool isClick) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueViewBgColor
|
||||||
|
: AppColors.greyBackgroundColor,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 20.w, top: 30.h, bottom: 30.h),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
isClick
|
||||||
|
? Image.asset(
|
||||||
|
'images/mine/icon_mine_blueSelect.png',
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
)
|
||||||
|
: SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
_buildRichText(titleStr, subTitle, isClick),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
for (int i = 0; i < boolList.length; i++) {
|
||||||
|
if (clickIndex == i) {
|
||||||
|
boolList[clickIndex] = true;
|
||||||
|
} else {
|
||||||
|
boolList[i] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRichText(String titleStr, String subTitle, bool isClick) {
|
||||||
|
//高亮样式
|
||||||
|
final TextStyle titleStyle = TextStyle(
|
||||||
|
color: isClick ? AppColors.blueTextTipsColor : Colors.black,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.w500);
|
||||||
|
//默认样式
|
||||||
|
final TextStyle subTipsStyle = TextStyle(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueTextTipsColor
|
||||||
|
: AppColors.placeholderTextColor,
|
||||||
|
fontSize: 20.sp);
|
||||||
|
|
||||||
|
late InlineSpan tipsPreviewSpan = TextSpan(children: [
|
||||||
|
TextSpan(text: titleStr, style: titleStyle),
|
||||||
|
TextSpan(text: subTitle, style: subTipsStyle),
|
||||||
|
]);
|
||||||
|
return RichText(text: tipsPreviewSpan);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,204 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:star_lock/tools/custom_bottom_sheet.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/commonItem.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class FaceUnlockPage extends StatefulWidget {
|
||||||
|
const FaceUnlockPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<FaceUnlockPage> createState() => _FaceUnlockPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FaceUnlockPageState extends State<FaceUnlockPage> {
|
||||||
|
bool faceOn = false; //面容开锁
|
||||||
|
bool autoBright = false; //自动亮屏
|
||||||
|
String senseDistance = '远距离'; //感应距离
|
||||||
|
String antiMisoperation = '关闭'; //防误开
|
||||||
|
List<String> senseDistanceList = ['远距离', '近距离'];
|
||||||
|
List<String> antiMisoperationList = ['关闭', '5秒', '10秒', '15秒', '30秒', '60秒'];
|
||||||
|
|
||||||
|
//高亮样式
|
||||||
|
final TextStyle titleStyle = TextStyle(
|
||||||
|
color: Colors.black, fontSize: 24.sp, fontWeight: FontWeight.w500);
|
||||||
|
//默认样式
|
||||||
|
final TextStyle subTipsStyle =
|
||||||
|
TextStyle(color: AppColors.placeholderTextColor, fontSize: 22.sp);
|
||||||
|
|
||||||
|
late InlineSpan tipsPreviewSpan = TextSpan(children: [
|
||||||
|
TextSpan(text: '添加和使用面容开锁时:\n', style: titleStyle),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
'\n1、请尽量保持单人在门前操作;\n2、请站立在门锁正前方约0.5~0.8米,面向门锁;\n3、请保持脸部无遮挡,露出五官;\n4、面容识别异常时,可触摸数字键盘任意按键,手动重启人脸识别。',
|
||||||
|
style: subTipsStyle),
|
||||||
|
]);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '面容开锁设置',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: '面容开锁',
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget:
|
||||||
|
SizedBox(width: 60.w, height: 50.h, child: _switch(1))),
|
||||||
|
CommonItem(
|
||||||
|
leftTitel: '自动亮屏',
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget:
|
||||||
|
SizedBox(width: 60.w, height: 50.h, child: _switch(2))),
|
||||||
|
_buildSubTitleItem(
|
||||||
|
'感应距离', '感应到门前约1.5米有人时,将自动启动面部识别开锁。', senseDistance, () {
|
||||||
|
_openBottomItemSheet(senseDistanceList, 0);
|
||||||
|
}),
|
||||||
|
SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
),
|
||||||
|
_buildSubTitleItem('防误开', '防误开已关闭,关门后仍可使用面容开锁', antiMisoperation,
|
||||||
|
() {
|
||||||
|
_openBottomItemSheet(antiMisoperationList, 1);
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30.h,
|
||||||
|
)),
|
||||||
|
_buildTipsView(),
|
||||||
|
SizedBox(
|
||||||
|
height: 60.h,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSubTitleItem(
|
||||||
|
String leftStr, String subTitle, String rightStr, Function()? action) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: action,
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 20.sp, right: 20.sp, top: 20.h),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
leftStr,
|
||||||
|
style: TextStyle(fontSize: 24.sp, color: Colors.black),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
subTitle,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: AppColors.btnDisableColor),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
rightStr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/icon_right_grey.png',
|
||||||
|
width: 12.w,
|
||||||
|
height: 21.w,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTipsView() {
|
||||||
|
return Container(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.mainBackgroundColor,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 20.w, top: 30.h, bottom: 40.h, right: 15.w),
|
||||||
|
child: RichText(text: tipsPreviewSpan)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
CupertinoSwitch _switch(int getIndex) {
|
||||||
|
return CupertinoSwitch(
|
||||||
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
|
thumbColor: CupertinoColors.white,
|
||||||
|
value: getIndex == 1 ? faceOn : autoBright,
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
if (getIndex == 1) {
|
||||||
|
faceOn = value;
|
||||||
|
} else {
|
||||||
|
autoBright = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future _openBottomItemSheet(
|
||||||
|
List<String> bottomItemList, int clickIndex) async {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertBottomWidget(
|
||||||
|
topTitle: '',
|
||||||
|
items: bottomItemList,
|
||||||
|
chooseCallback: (value) {
|
||||||
|
if (clickIndex == 0) {
|
||||||
|
//感应距离
|
||||||
|
senseDistance = senseDistanceList[value];
|
||||||
|
} else if (clickIndex == 1) {
|
||||||
|
//防误开
|
||||||
|
antiMisoperation = antiMisoperationList[value];
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,6 +27,8 @@ class LockSetPage extends StatefulWidget {
|
|||||||
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||||
final logic = Get.put(LockSetLogic());
|
final logic = Get.put(LockSetLogic());
|
||||||
final state = Get.find<LockSetLogic>().state;
|
final state = Get.find<LockSetLogic>().state;
|
||||||
|
bool isClick1 = false;
|
||||||
|
bool isClick2 = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -53,7 +55,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
children: [
|
children: [
|
||||||
// 基本信息
|
// 基本信息
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.basicInformation!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.basicInformation!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -65,10 +68,12 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 门磁
|
// 门磁
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.doorStatus == 1 ? true : false,
|
visible: state.lockFeature.value.doorStatus == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -78,10 +83,12 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}))),
|
}))),
|
||||||
// 无线键盘
|
// 无线键盘
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.wirelessKeyboard == 1 ? true : false,
|
visible: state.lockFeature.value.wirelessKeyboard == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -91,7 +98,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}))),
|
}))),
|
||||||
// 照明
|
// 照明
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.lightingTime == 1 ? true : false,
|
visible: state.lockFeature.value.lightingTime == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '照明',
|
leftTitel: '照明',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -114,10 +123,14 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.autoLock == 1 ? true : false,
|
visible:
|
||||||
|
state.lockFeature.value.autoLock == 1 ? true : false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
leftTitel:
|
||||||
rightTitle: (state.lockSettingInfo.value.autoLock ?? 0) > 0
|
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
|
rightTitle: (state.lockSettingInfo.value.autoLock ??
|
||||||
|
0) >
|
||||||
|
0
|
||||||
? "${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond ?? 0}s"
|
? "${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond ?? 0}s"
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
@ -127,15 +140,17 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
||||||
// : TranslationLoader.lanKeys!.closed!.tr),
|
// : TranslationLoader.lanKeys!.closed!.tr),
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.automaticBlockingPage, arguments: {
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: {
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}))),
|
}))),
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Obx(() {
|
Obx(() {
|
||||||
var titleStr = "";
|
var titleStr = "";
|
||||||
if ((state.lockSettingInfo.value.lockSound ?? 0) == 1) {
|
if ((state.lockSettingInfo.value.lockSound ?? 0) == 1) {
|
||||||
switch (state.lockSettingInfo.value.lockSoundVolume ?? 0) {
|
switch (
|
||||||
|
state.lockSettingInfo.value.lockSoundVolume ?? 0) {
|
||||||
case 1:
|
case 1:
|
||||||
titleStr = TranslationLoader.lanKeys!.low!.tr;
|
titleStr = TranslationLoader.lanKeys!.low!.tr;
|
||||||
break;
|
break;
|
||||||
@ -156,7 +171,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
titleStr = TranslationLoader.lanKeys!.closed!.tr;
|
titleStr = TranslationLoader.lanKeys!.closed!.tr;
|
||||||
}
|
}
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: state.lockFeature.value.lockSound == 1 ? true : false,
|
visible: state.lockFeature.value.lockSound == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockSound!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockSound!.tr,
|
||||||
rightTitle: titleStr,
|
rightTitle: titleStr,
|
||||||
@ -170,12 +187,16 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
}),
|
}),
|
||||||
// 防撬报警
|
// 防撬报警
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.antiPrySwitch == 1 ? true : false,
|
visible: state.lockFeature.value.antiPrySwitch == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||||
rightTitle:
|
rightTitle:
|
||||||
(state.lockSettingInfo.value.antiPrySwitch ?? 0) == 1
|
(state.lockSettingInfo.value.antiPrySwitch ??
|
||||||
|
0) ==
|
||||||
|
1
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
@ -189,40 +210,54 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
// visible: state.lockFeature.value.passageMode == 1 ? true : false,
|
// visible: state.lockFeature.value.passageMode == 1 ? true : false,
|
||||||
visible:true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
leftTitel:
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
|
rightTitle:
|
||||||
|
(state.lockSettingInfo.value.passageMode ?? 0) ==
|
||||||
|
1
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.normallyOpenModePage, arguments: {
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: {
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}))),
|
}))),
|
||||||
// 远程开锁
|
// 远程开锁
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.remoteUnlock == 1 ? true : false,
|
visible: state.lockFeature.value.remoteUnlock == 1
|
||||||
child: CommonItem(leftTitel:
|
? true
|
||||||
TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
: false,
|
||||||
rightTitle: (state.lockSettingInfo.value.remoteUnlock ?? 0) == 1
|
child: CommonItem(
|
||||||
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||||
|
rightTitle:
|
||||||
|
(state.lockSettingInfo.value.remoteUnlock ?? 0) ==
|
||||||
|
1
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.remoteUnlockingPage, arguments: {
|
Get.toNamed(Routers.remoteUnlockingPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: {
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}))),
|
}))),
|
||||||
// 重置键
|
// 重置键
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockFeature.value.resetSwitch == 1 ? true : false,
|
visible: state.lockFeature.value.resetSwitch == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||||
rightTitle: (state.lockSettingInfo.value.resetSwitch ?? 0) == 1
|
rightTitle:
|
||||||
|
(state.lockSettingInfo.value.resetSwitch ?? 0) ==
|
||||||
|
1
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
@ -241,55 +276,45 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
leftTitel: '面容开锁',
|
leftTitel: '面容开锁',
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveDirection: true,
|
||||||
rightWidget: SizedBox(
|
action: () {
|
||||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
Get.toNamed(Routers.faceUnlockPage);
|
||||||
|
})),
|
||||||
// ),
|
// ),
|
||||||
|
|
||||||
// Obx(() =>
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '自动亮屏',
|
leftTitel: '猫眼工作模式',
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: SizedBox(
|
|
||||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
|
||||||
// ),
|
|
||||||
// Obx(() =>
|
|
||||||
Visibility(
|
|
||||||
visible: true,
|
|
||||||
child: CommonItem(
|
|
||||||
leftTitel: '逗留警告',
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: SizedBox(
|
|
||||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
|
||||||
// ),
|
|
||||||
// Obx(() =>
|
|
||||||
Visibility(
|
|
||||||
visible: true,
|
|
||||||
child: CommonItem(
|
|
||||||
leftTitel: '异常警告',
|
|
||||||
rightTitle: "",
|
|
||||||
isHaveLine: true,
|
|
||||||
isHaveRightWidget: true,
|
|
||||||
rightWidget: SizedBox(
|
|
||||||
width: 60.w, child: _otherUnHaveDoneSwitch()))),
|
|
||||||
// ),
|
|
||||||
// Obx(() =>
|
|
||||||
Visibility(
|
|
||||||
visible: true,
|
|
||||||
child: CommonItem(
|
|
||||||
leftTitel: '感应距离',
|
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
Get.toNamed(Routers.catEyeWorkModePage);
|
||||||
})),
|
})),
|
||||||
|
// Obx(() =>
|
||||||
|
//自动亮屏已包括至面容开锁模块
|
||||||
|
// Visibility(
|
||||||
|
// visible: true,
|
||||||
|
// child: CommonItem(
|
||||||
|
// leftTitel: '自动亮屏',
|
||||||
|
// rightTitle: "",
|
||||||
|
// isHaveLine: true,
|
||||||
|
// isHaveDirection: true,
|
||||||
|
// action: () {})),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
// Obx(() =>
|
||||||
|
//感应距离已包括至面容开锁模块
|
||||||
|
// Visibility(
|
||||||
|
// visible: true,
|
||||||
|
// child: CommonItem(
|
||||||
|
// leftTitel: '感应距离',
|
||||||
|
// rightTitle: "",
|
||||||
|
// isHaveLine: true,
|
||||||
|
// isHaveDirection: true,
|
||||||
|
// action: () {
|
||||||
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
// })),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
@ -300,7 +325,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
Get.toNamed(Routers.openDoorDirectionPage);
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
@ -312,9 +338,31 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
|
Get.toNamed(Routers.motorPowerPage);
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
|
// Obx(() =>
|
||||||
|
Visibility(
|
||||||
|
visible: true,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '逗留警告',
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: _otherToDoSwitch(0),
|
||||||
|
)),
|
||||||
|
// ),
|
||||||
|
// Obx(() =>
|
||||||
|
Visibility(
|
||||||
|
visible: true,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '异常警告',
|
||||||
|
rightTitle: "",
|
||||||
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: _otherToDoSwitch(1))),
|
||||||
|
// ),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//-----新增至此
|
//-----新增至此
|
||||||
// 标记房态
|
// 标记房态
|
||||||
@ -326,22 +374,29 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
title = TranslationLoader.lanKeys!.leisure!.tr;
|
title = TranslationLoader.lanKeys!.leisure!.tr;
|
||||||
}
|
}
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: state.lockStatus.value.roomStatus == 1 ? true : false,
|
visible: state.lockStatus.value.roomStatus == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.markedHouseState!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
||||||
rightTitle: title,
|
rightTitle: title,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.markedHouseStatePage, arguments: state.lockSetInfoData.value);
|
Get.toNamed(Routers.markedHouseStatePage,
|
||||||
|
arguments: state.lockSetInfoData.value);
|
||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
// 考勤
|
// 考勤
|
||||||
Obx(() =>
|
Obx(
|
||||||
Visibility(
|
() => Visibility(
|
||||||
visible: state.lockFeature.value.attendance == 1 ? true : false,
|
visible: state.lockFeature.value.attendance == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
@ -349,11 +404,14 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
width: 60.w, child: _openCheckInSwitch()))),
|
width: 60.w, child: _openCheckInSwitch()))),
|
||||||
),
|
),
|
||||||
// 开锁提醒
|
// 开锁提醒
|
||||||
Obx(() =>
|
Obx(
|
||||||
Visibility(
|
() => Visibility(
|
||||||
visible: state.lockFeature.value.unlockReminder == 1 ? true : false,
|
visible: state.lockFeature.value.unlockReminder == 1
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
leftTitel:
|
||||||
|
TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
@ -362,10 +420,13 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// wifi配网
|
// wifi配网
|
||||||
Obx(() =>
|
Obx(
|
||||||
Visibility(
|
() => Visibility(
|
||||||
visible: state.lockFeature.value.wifi == 1 ? true : false,
|
visible:
|
||||||
child: CommonItem(leftTitel: TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
state.lockFeature.value.wifi == 1 ? true : false,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: TranslationLoader
|
||||||
|
.lanKeys!.wifiDistributionNetwork!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -375,46 +436,46 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
),
|
),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 锁时间
|
// 锁时间
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockTimePage, arguments: {
|
Get.toNamed(Routers.lockTimePage, arguments: {
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 诊断
|
// 诊断
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.diagnosePage, arguments: {
|
Get.toNamed(Routers.diagnosePage, arguments: {
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 上传数据
|
// 上传数据
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
|
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.uploadDataPage);
|
Get.toNamed(Routers.uploadDataPage);
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// Visibility(
|
// Visibility(
|
||||||
@ -431,17 +492,17 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 锁升级
|
// 锁升级
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel:
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.lockEscalation!.tr,
|
TranslationLoader.lanKeys!.lockEscalation!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockEscalationPage);
|
Get.toNamed(Routers.lockEscalationPage);
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Container(
|
Container(
|
||||||
@ -465,8 +526,10 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget rightText(String rightTitle){
|
Widget rightText(String rightTitle) {
|
||||||
return Text(rightTitle ?? "", textAlign: TextAlign.end, style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor));
|
return Text(rightTitle ?? "",
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor));
|
||||||
}
|
}
|
||||||
|
|
||||||
CupertinoSwitch _openCheckInSwitch() {
|
CupertinoSwitch _openCheckInSwitch() {
|
||||||
@ -474,7 +537,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: ((state.lockSettingInfo.value.attendance ?? 0) == 1) ? true : false,
|
value:
|
||||||
|
((state.lockSettingInfo.value.attendance ?? 0) == 1) ? true : false,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
int isOnStr;
|
int isOnStr;
|
||||||
@ -501,10 +565,12 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
activeColor: CupertinoColors.activeBlue,
|
activeColor: CupertinoColors.activeBlue,
|
||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: (state.lockSettingInfo.value.unlockReminder ?? 0) == 1 ? true : false,
|
value:
|
||||||
|
(state.lockSettingInfo.value.unlockReminder ?? 0) == 1 ? true : false,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.isLockPickingReminder.value = state.isLockPickingReminder.value == 1 ? 2 : 1;
|
state.isLockPickingReminder.value =
|
||||||
|
state.isLockPickingReminder.value == 1 ? 2 : 1;
|
||||||
logic.setLockPickingReminder();
|
logic.setLockPickingReminder();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -523,6 +589,24 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CupertinoSwitch _otherToDoSwitch(int clickIndex) {
|
||||||
|
return CupertinoSwitch(
|
||||||
|
activeColor: CupertinoColors.activeBlue,
|
||||||
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
|
thumbColor: CupertinoColors.white,
|
||||||
|
value: clickIndex == 0 ? isClick1 : isClick2,
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
if (clickIndex == 0) {
|
||||||
|
isClick1 = value;
|
||||||
|
} else {
|
||||||
|
isClick2 = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//确认弹窗
|
//确认弹窗
|
||||||
void showCupertinoAlertDialog(widgetContext) {
|
void showCupertinoAlertDialog(widgetContext) {
|
||||||
showCupertinoDialog(
|
showCupertinoDialog(
|
||||||
@ -553,10 +637,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void showDeletAlertDialog(
|
void showDeletAlertDialog(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
) {
|
) {
|
||||||
// showDialog(
|
// showDialog(
|
||||||
// context: context,
|
// context: context,
|
||||||
// builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
@ -638,7 +721,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
Toast.show(msg: "请输入登录密码");
|
Toast.show(msg: "请输入登录密码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logic.checkLoginPassword((){
|
logic.checkLoginPassword(() {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -0,0 +1,112 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class MotorPowerPage extends StatefulWidget {
|
||||||
|
const MotorPowerPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MotorPowerPage> createState() => _MotorPowerPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MotorPowerPageState extends State<MotorPowerPage> {
|
||||||
|
bool isCheck = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '电机功率设置',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 40.h,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 40.w),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
'请根据门锁实际情况,请谨慎选择电机功率:',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 40.h,
|
||||||
|
),
|
||||||
|
_buildTipsView('小功率:\n', '耗电少', isCheck),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
|
_buildTipsView('大功率:\n',
|
||||||
|
'如果开锁时锁舌不能正常收回,或需要带动\n天地钩,建议选择大功率。此时耗电将会\n增加。', !isCheck)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTipsView(String titleStr, String subTitle, bool isClick) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueViewBgColor
|
||||||
|
: AppColors.greyBackgroundColor,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 20.w, top: 30.h, bottom: 30.h, right: 15.w),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
isClick
|
||||||
|
? Image.asset(
|
||||||
|
'images/mine/icon_mine_blueSelect.png',
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
)
|
||||||
|
: SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
height: 14.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
_buildRichText(titleStr, subTitle, isClick),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
isCheck = !isCheck;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRichText(String titleStr, String subTitle, bool isClick) {
|
||||||
|
//高亮样式
|
||||||
|
final TextStyle titleStyle = TextStyle(
|
||||||
|
color: isClick ? AppColors.blueTextTipsColor : Colors.black,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.w500);
|
||||||
|
//默认样式
|
||||||
|
final TextStyle subTipsStyle = TextStyle(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueTextTipsColor
|
||||||
|
: AppColors.placeholderTextColor,
|
||||||
|
fontSize: 20.sp);
|
||||||
|
|
||||||
|
late InlineSpan tipsPreviewSpan = TextSpan(children: [
|
||||||
|
TextSpan(text: titleStr, style: titleStyle),
|
||||||
|
TextSpan(text: subTitle, style: subTipsStyle),
|
||||||
|
]);
|
||||||
|
return RichText(text: tipsPreviewSpan);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,125 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class OpenDoorDirectionPage extends StatefulWidget {
|
||||||
|
const OpenDoorDirectionPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<OpenDoorDirectionPage> createState() => _OpenDoorDirectionPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _OpenDoorDirectionPageState extends State<OpenDoorDirectionPage> {
|
||||||
|
bool isCheck = false;
|
||||||
|
int selectIndex = 0;
|
||||||
|
int _selectGroupValue = 1; //默认选中的单选框的值
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '开门方向设置',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 60.h,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(left: 40.w),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
'请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/mine/icon_mine_openDoorDir.png',
|
||||||
|
width: 500.w,
|
||||||
|
height: 300,
|
||||||
|
),
|
||||||
|
_buildRadioGroupRowWidget(),
|
||||||
|
SizedBox(
|
||||||
|
height: 60.h,
|
||||||
|
),
|
||||||
|
_buildTipsView(
|
||||||
|
'判断方法:\n',
|
||||||
|
'人站在屋外,面向入户门。\n如果门的合页或门轴在左边,则门是左开;\n如果门的合页或门轴在右边,则门是右开。\n如果设置错误,将无法正常开关门。\n建议由安装或维修人员操作。',
|
||||||
|
false)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
//单选框选择
|
||||||
|
Row _buildRadioGroupRowWidget() {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 60.w,
|
||||||
|
),
|
||||||
|
_colorfulCheckBox(1),
|
||||||
|
Text(
|
||||||
|
"左开",
|
||||||
|
style: TextStyle(fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 200.w,
|
||||||
|
),
|
||||||
|
_colorfulCheckBox(2),
|
||||||
|
Text(
|
||||||
|
'右开',
|
||||||
|
style: TextStyle(fontSize: 24.sp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Radio _colorfulCheckBox(int selectIndex) {
|
||||||
|
return Radio(
|
||||||
|
value: selectIndex,
|
||||||
|
onChanged: (value) {
|
||||||
|
// print(value);
|
||||||
|
_selectGroupValue = value;
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
groupValue: _selectGroupValue,
|
||||||
|
activeColor: AppColors.mainColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTipsView(String titleStr, String subTitle, bool isClick) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(left: 40.w),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: _buildRichText(titleStr, subTitle, false),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildRichText(String titleStr, String subTitle, bool isClick) {
|
||||||
|
//高亮样式
|
||||||
|
final TextStyle titleStyle = TextStyle(
|
||||||
|
color: isClick ? AppColors.blueTextTipsColor : Colors.black,
|
||||||
|
fontSize: 24.sp,
|
||||||
|
fontWeight: FontWeight.w500);
|
||||||
|
//默认样式
|
||||||
|
final TextStyle subTipsStyle = TextStyle(
|
||||||
|
color: isClick
|
||||||
|
? AppColors.blueTextTipsColor
|
||||||
|
: AppColors.placeholderTextColor,
|
||||||
|
fontSize: 22.sp);
|
||||||
|
|
||||||
|
late InlineSpan tipsPreviewSpan = TextSpan(children: [
|
||||||
|
TextSpan(text: titleStr, style: titleStyle),
|
||||||
|
TextSpan(text: subTitle, style: subTipsStyle),
|
||||||
|
]);
|
||||||
|
return RichText(text: tipsPreviewSpan);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -367,10 +367,11 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
// Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
// arguments: 1);
|
// arguments: 1);
|
||||||
// Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
tokNative('flutter_videoTalk_to_ios',
|
|
||||||
arguments: {'videoTalk': 'videoTalk'}).then((result) {
|
// tokNative('flutter_videoTalk_to_ios',
|
||||||
print('$result');
|
// arguments: {'videoTalk': 'videoTalk'}).then((result) {
|
||||||
});
|
// print('$result');
|
||||||
|
// });
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||