1,新增猫眼自定义模式页面
2,新增录像时段页面
This commit is contained in:
parent
5ef4f42b39
commit
9231f3cef6
@ -472,5 +472,8 @@
|
||||
"openLeft": "Open Left",
|
||||
"openRight": "Open Right",
|
||||
"judgmentMethod": "Judgment Method:\n",
|
||||
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel."
|
||||
"judgmentMethodContent": "The man stood outside the house, facing the entrance door. \nIf the hinge or shaft of the door is on the left, the door is left open; \nA door is right-open if its hinge or shaft is on the right. \nIf the setting is wrong, it will not open and close the door properly. \nRecommended to be operated by installation or maintenance personnel.",
|
||||
|
||||
"customMode": "Custom mode",
|
||||
"videoSlot": "Video slot"
|
||||
}
|
||||
|
||||
@ -472,6 +472,8 @@
|
||||
"openLeft": "openLeft",
|
||||
"openRight": "openRight",
|
||||
"judgmentMethod": "judgmentMethod",
|
||||
"judgmentMethodContent": "judgmentMethodContent"
|
||||
"judgmentMethodContent": "judgmentMethodContent",
|
||||
|
||||
"customMode": "customMode",
|
||||
"videoSlot": "videoSlot"
|
||||
}
|
||||
@ -475,5 +475,8 @@
|
||||
"openLeft": "左开",
|
||||
"openRight": "右开",
|
||||
"judgmentMethod": "判断方法:\n",
|
||||
"judgmentMethodContent": "人站在屋外,面向入户门。\n如果门的合页或门轴在左边,则门是左开;\n如果门的合页或门轴在右边,则门是右开。\n如果设置错误,将无法正常开关门。\n建议由安装或维修人员操作。"
|
||||
"judgmentMethodContent": "人站在屋外,面向入户门。\n如果门的合页或门轴在左边,则门是左开;\n如果门的合页或门轴在右边,则门是右开。\n如果设置错误,将无法正常开关门。\n建议由安装或维修人员操作。",
|
||||
|
||||
"customMode": "自定义模式",
|
||||
"videoSlot": "录像时段"
|
||||
}
|
||||
@ -7,7 +7,9 @@ import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/ma
|
||||
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/lcokSet/addFamily/addFamily_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/videoSlot/videoSlot_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/faceUnlock/faceUnlock_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/familyDetails/familyDetails_page.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/lockUser/lockUser_page.dart';
|
||||
@ -410,6 +412,8 @@ abstract class Routers {
|
||||
'/passwordKeyDetailChangeDatePage'; //密码更改时间
|
||||
static const realTimePicturePage = '/realTimePicturePage'; //实时监控画面
|
||||
static const doorLockLogPage = '/doorLockLogPage'; //门锁日志
|
||||
static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式
|
||||
static const videoSlotPage = '/videoSlotPage'; //录像时段
|
||||
}
|
||||
|
||||
abstract class AppRouters {
|
||||
@ -996,6 +1000,10 @@ abstract class AppRouters {
|
||||
GetPage(
|
||||
name: Routers.realTimePicturePage,
|
||||
page: () => const RealTimePicturePage()),
|
||||
GetPage(name: Routers.doorLockLogPage, page: () => const DoorLockLogPage())
|
||||
GetPage(name: Routers.doorLockLogPage, page: () => const DoorLockLogPage()),
|
||||
GetPage(
|
||||
name: Routers.catEyeCustomModePage,
|
||||
page: () => const CatEyeCustomModePage()),
|
||||
GetPage(name: Routers.videoSlotPage, page: (() => const VideoSlotPage())),
|
||||
];
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
class CatEyeCustomModeLogic extends BaseGetXController {
|
||||
final CatEyeCustomModeState state = CatEyeCustomModeState();
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
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';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeCustomMode/catEyeCustomMode_logic.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/custom_bottom_sheet.dart';
|
||||
import 'package:star_lock/tools/titleAppBar.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class CatEyeCustomModePage extends StatefulWidget {
|
||||
const CatEyeCustomModePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<CatEyeCustomModePage> createState() => _CatEyeCustomModePageState();
|
||||
}
|
||||
|
||||
class _CatEyeCustomModePageState extends State<CatEyeCustomModePage> {
|
||||
final logic = Get.put(CatEyeCustomModeLogic());
|
||||
final state = Get.find<CatEyeCustomModeLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.customMode!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.videoSlot!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Text('当日22:00~次日08:00',
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor)),
|
||||
action: () => Get.toNamed(Routers.videoSlotPage),
|
||||
),
|
||||
_buildSubTitleItem('有人出现时录像', '有人在门口出现10秒后开始录像。\n有人按门铃时立即录像',
|
||||
state.showsUpVideo.value, () {
|
||||
_openBottomItemSheet(state.showsUpVideoList.value, 0);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
_buildSubTitleItem(
|
||||
'人体侦测距离', '有人出现在门前1.5米范围时启动录像', state.detectionRange.value, () {
|
||||
_openBottomItemSheet(state.detectionRangeList.value, 1);
|
||||
}),
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: 30.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,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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) {
|
||||
//感应距离
|
||||
state.showsUpVideo.value = state.showsUpVideoList.value[value];
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class CatEyeCustomModeState {
|
||||
var isCheck = false.obs;
|
||||
var faceOn = false.obs; //面容开锁
|
||||
var autoBright = false.obs; //自动亮屏
|
||||
var showsUpVideo = '10${TranslationLoader.lanKeys!.second!.tr}'.obs; //有人出现时录像
|
||||
var detectionRange = '约1.5米'.obs; //人体侦测距离
|
||||
var showsUpVideoList = [
|
||||
'不录像',
|
||||
'立即录像',
|
||||
'5${TranslationLoader.lanKeys!.second!.tr}',
|
||||
'10${TranslationLoader.lanKeys!.second!.tr}',
|
||||
'15${TranslationLoader.lanKeys!.second!.tr}',
|
||||
'30${TranslationLoader.lanKeys!.second!.tr}',
|
||||
'60${TranslationLoader.lanKeys!.second!.tr}'
|
||||
].obs;
|
||||
var detectionRangeList = ['约0.8米', '约1.5米', '约3米'].obs;
|
||||
//高亮样式
|
||||
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: '${TranslationLoader.lanKeys!.addAndUseFaceWhenUnlocking!.tr}:\n',
|
||||
style: titleStyle),
|
||||
TextSpan(
|
||||
text: TranslationLoader.lanKeys!.addAndUseFaceWhenUnlockingTip!.tr,
|
||||
style: subTipsStyle),
|
||||
]);
|
||||
}
|
||||
@ -1,10 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
|
||||
|
||||
class CatEyeWorkModePage extends StatefulWidget {
|
||||
const CatEyeWorkModePage({Key? key}) : super(key: key);
|
||||
|
||||
@ -72,7 +73,8 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 20.w, top: 30.h, bottom: 30.h),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, top: 30.h, bottom: 30.h, right: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
isClick
|
||||
@ -85,8 +87,40 @@ class _CatEyeWorkModePageState extends State<CatEyeWorkModePage> {
|
||||
width: 20.w,
|
||||
height: 14.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
_buildRichText(titleStr, subTitle, isClick),
|
||||
SizedBox(width: 10.w),
|
||||
Expanded(
|
||||
child: _buildRichText(titleStr, subTitle, isClick),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
width: 90.w,
|
||||
height: 40.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
border: Border.all(
|
||||
color: AppColors.placeholderTextColor, width: 1.w),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
clickIndex == 3 ? '设置' : '查看',
|
||||
style: TextStyle(
|
||||
color: AppColors.placeholderTextColor,
|
||||
fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (clickIndex == 3) {
|
||||
Get.toNamed(Routers.catEyeCustomModePage);
|
||||
} else {
|
||||
// Get.toNamed(Routes.catEyeWorkModeDetailPage);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
|
||||
@ -0,0 +1 @@
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/lcokSet/catEyeSet/catEyeSet/catEyeSet_logic.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
|
||||
class VideoSlotPage extends StatefulWidget {
|
||||
const VideoSlotPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<VideoSlotPage> createState() => _VideoSlotPageState();
|
||||
}
|
||||
|
||||
class _VideoSlotPageState extends State<VideoSlotPage> {
|
||||
bool isCheck = false;
|
||||
List boolList = [true, false, false, false];
|
||||
|
||||
final logic = Get.put(CatEyeSetLogic());
|
||||
final state = Get.find<CatEyeSetLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '录像时段',
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
_buildTipsView('全天', '', 0, boolList[0]),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
_buildTipsView('自定义时间', '', 1, boolList[1]),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
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, right: 20.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: 10.w),
|
||||
Expanded(
|
||||
child: _buildRichText(titleStr, subTitle, isClick),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -430,6 +430,8 @@ class LanKeyEntity {
|
||||
this.hint,
|
||||
this.areYouSureYouWantToDeleteIt,
|
||||
this.faceUnlocksSet,
|
||||
this.customMode,
|
||||
this.videoSlot,
|
||||
this.automaticBrighteningScreen,
|
||||
this.sensingDistance,
|
||||
this.sensingDistanceTip,
|
||||
@ -918,6 +920,8 @@ class LanKeyEntity {
|
||||
areYouSureYouWantToDeleteIt = json['areYouSureYouWantToDeleteIt'];
|
||||
|
||||
faceUnlocksSet = json['faceUnlocksSet'];
|
||||
customMode = json['customMode'];
|
||||
videoSlot = json['videoSlot'];
|
||||
automaticBrighteningScreen = json['automaticBrighteningScreen'];
|
||||
sensingDistance = json['sensingDistance'];
|
||||
sensingDistanceTip = json['sensingDistanceTip'];
|
||||
@ -1393,6 +1397,8 @@ class LanKeyEntity {
|
||||
String? areYouSureYouWantToDeleteIt;
|
||||
|
||||
String? faceUnlocksSet;
|
||||
String? customMode;
|
||||
String? videoSlot;
|
||||
String? automaticBrighteningScreen;
|
||||
String? sensingDistance;
|
||||
String? sensingDistanceTip;
|
||||
@ -1880,6 +1886,8 @@ class LanKeyEntity {
|
||||
map['areYouSureYouWantToDeleteIt'] = areYouSureYouWantToDeleteIt;
|
||||
|
||||
map['faceUnlocksSet'] = faceUnlocksSet;
|
||||
map['customMode'] = customMode;
|
||||
map['videoSlot'] = videoSlot;
|
||||
map['automaticBrighteningScreen'] = automaticBrighteningScreen;
|
||||
map['sensingDistance'] = sensingDistance;
|
||||
map['sensingDistanceTip'] = sensingDistanceTip;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user