This commit is contained in:
魏少阳 2024-01-26 14:11:02 +08:00
commit d0d406ff3d
3 changed files with 125 additions and 130 deletions

View File

@ -28,8 +28,6 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
@ -58,7 +56,27 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Theme(
topAdvancedCalendarWidget(),
Divider(
height: 1,
color: AppColors.greyLineColor,
indent: 30.w,
endIndent: 30.w,
),
eventDropDownWidget(),
SizedBox(
height: 20.h,
),
Expanded(child: timeLineView()),
],
),
);
}
//
Widget topAdvancedCalendarWidget() {
final theme = Theme.of(context);
return Theme(
data: theme.copyWith(
textTheme: theme.textTheme.copyWith(
titleMedium: theme.textTheme.titleMedium!.copyWith(
@ -75,8 +93,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
),
),
primaryColor: AppColors.mainColor,
highlightColor: Colors.yellow,
disabledColor: Colors.green,
highlightColor: AppColors.blackColor,
disabledColor: Colors.grey,
),
child: AdvancedCalendar(
controller: state.calendarControllerCustom,
@ -92,18 +110,28 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
letterSpacing: 0,
),
),
),
Row(children: [
);
}
//
Widget eventDropDownWidget() {
return Row(children: [
SizedBox(
width: 30.w,
width: 50.w,
),
Obx(() => DropdownButton<String>(
value: state.dropdownValue.value,
icon: const Icon(Icons.arrow_drop_down),
iconSize: 40,
elevation: 12,
style: TextStyle(fontSize: 26.sp, color: Colors.black),
// elevation: 12,
style: TextStyle(
fontSize: 26.sp,
color: Colors.black,
fontWeight: FontWeight.w600),
iconEnabledColor: Colors.grey,
underline: Container(
height: 0,
),
onChanged: (newValue) {
state.dropdownValue.value = newValue!;
},
@ -115,13 +143,13 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
);
}).toList(),
))
]),
SizedBox(
height: 20.h,
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
]);
}
//
Widget timeLineView() {
return Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 20.h),
//contain设置一个10像素的圆角
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
@ -129,7 +157,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
builder: TimelineTileBuilder.fromStyle(
contentsAlign: ContentsAlign.basic,
contentsBuilder: (context, index) => Padding(
padding: EdgeInsets.all(24.0.w),
padding: EdgeInsets.only(left: 20.w, top: 20.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -137,15 +165,15 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
Text('09:30 有人出现在门口',
textAlign: TextAlign.left,
style: TextStyle(
color: AppColors.darkGrayTextColor,
color: Colors.black,
fontSize: 24.sp,
)),
SizedBox(
height: 10.h,
fontWeight: FontWeight.w600)),
Image(
image: const AssetImage(
'images/main/icon_lockDetail_monitoringvoiceFrist.png'),
width: 260.w,
height: 260.h,
),
const Image(
image: AssetImage(
'images/main/icon_lockDetail_monitoringvoiceFrist.png')),
],
),
),
@ -154,43 +182,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
theme: TimelineThemeData(
nodePosition: 0.04, //
connectorTheme: const ConnectorThemeData(
thickness: 2.0,
color: AppColors.greyBackgroundColor,
indent: 0.5),
thickness: 1.0, color: AppColors.greyLineColor, indent: 0.5),
indicatorTheme: const IndicatorThemeData(
size: 16.0,
color: AppColors.greyBackgroundColor,
position: 0.07),
size: 8.0, color: AppColors.greyLineColor, position: 0.07),
),
),
)),
],
),
);
}
String getTypeIcon(int type) {
String title = 'images/controls_user.png';
switch (type) {
case 1:
//
title = 'images/controls_user.png';
break;
case 4:
//
title = 'images/icon_password.png';
break;
case 7:
// ic卡
title = 'images/icon_card.png';
break;
case 8:
//
title = 'images/icon_fingerprint.png';
break;
default:
break;
}
return title;
}
}

View File

@ -48,7 +48,7 @@ class AddFaceLogic extends BaseGetXController {
switch (status) {
case 0x00:
//
print("${reply.commandType!.typeValue} 人脸开始数据解析成功");
// print("${reply.commandType!.typeValue} 人脸开始数据解析成功");
state.ifConnectScuess.value = true;
//

View File

@ -69,8 +69,7 @@ class _AddFacePageState extends State<AddFacePage> {
? Container(
padding: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName:
"准备好了,开始添加", //TranslationLoader.lanKeys!.next!.tr,
btnName: "准备好了,开始添加",
borderRadius: 20.w,
onClick: () {
state.isClickAddFace.value = true;