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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: TitleAppBar(
@ -58,7 +56,27 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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( data: theme.copyWith(
textTheme: theme.textTheme.copyWith( textTheme: theme.textTheme.copyWith(
titleMedium: theme.textTheme.titleMedium!.copyWith( titleMedium: theme.textTheme.titleMedium!.copyWith(
@ -75,8 +93,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
), ),
), ),
primaryColor: AppColors.mainColor, primaryColor: AppColors.mainColor,
highlightColor: Colors.yellow, highlightColor: AppColors.blackColor,
disabledColor: Colors.green, disabledColor: Colors.grey,
), ),
child: AdvancedCalendar( child: AdvancedCalendar(
controller: state.calendarControllerCustom, controller: state.calendarControllerCustom,
@ -92,18 +110,28 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
letterSpacing: 0, letterSpacing: 0,
), ),
), ),
), );
Row(children: [ }
//
Widget eventDropDownWidget() {
return Row(children: [
SizedBox( SizedBox(
width: 30.w, width: 50.w,
), ),
Obx(() => DropdownButton<String>( Obx(() => DropdownButton<String>(
value: state.dropdownValue.value, value: state.dropdownValue.value,
icon: const Icon(Icons.arrow_drop_down), icon: const Icon(Icons.arrow_drop_down),
iconSize: 40, iconSize: 40,
elevation: 12, // elevation: 12,
style: TextStyle(fontSize: 26.sp, color: Colors.black), style: TextStyle(
fontSize: 26.sp,
color: Colors.black,
fontWeight: FontWeight.w600),
iconEnabledColor: Colors.grey, iconEnabledColor: Colors.grey,
underline: Container(
height: 0,
),
onChanged: (newValue) { onChanged: (newValue) {
state.dropdownValue.value = newValue!; state.dropdownValue.value = newValue!;
}, },
@ -115,13 +143,13 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
); );
}).toList(), }).toList(),
)) ))
]), ]);
SizedBox( }
height: 20.h,
), //
Expanded( Widget timeLineView() {
child: Container( return Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w), margin: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 20.h),
//contain设置一个10像素的圆角 //contain设置一个10像素的圆角
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(16.w)), color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
@ -129,7 +157,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
builder: TimelineTileBuilder.fromStyle( builder: TimelineTileBuilder.fromStyle(
contentsAlign: ContentsAlign.basic, contentsAlign: ContentsAlign.basic,
contentsBuilder: (context, index) => Padding( contentsBuilder: (context, index) => Padding(
padding: EdgeInsets.all(24.0.w), padding: EdgeInsets.only(left: 20.w, top: 20.h),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -137,15 +165,15 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> {
Text('09:30 有人出现在门口', Text('09:30 有人出现在门口',
textAlign: TextAlign.left, textAlign: TextAlign.left,
style: TextStyle( style: TextStyle(
color: AppColors.darkGrayTextColor, color: Colors.black,
fontSize: 24.sp, fontSize: 24.sp,
)), fontWeight: FontWeight.w600)),
SizedBox( Image(
height: 10.h, 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( theme: TimelineThemeData(
nodePosition: 0.04, // nodePosition: 0.04, //
connectorTheme: const ConnectorThemeData( connectorTheme: const ConnectorThemeData(
thickness: 2.0, thickness: 1.0, color: AppColors.greyLineColor, indent: 0.5),
color: AppColors.greyBackgroundColor,
indent: 0.5),
indicatorTheme: const IndicatorThemeData( indicatorTheme: const IndicatorThemeData(
size: 16.0, size: 8.0, color: AppColors.greyLineColor, position: 0.07),
color: AppColors.greyBackgroundColor,
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) { switch (status) {
case 0x00: case 0x00:
// //
print("${reply.commandType!.typeValue} 人脸开始数据解析成功"); // print("${reply.commandType!.typeValue} 人脸开始数据解析成功");
state.ifConnectScuess.value = true; state.ifConnectScuess.value = true;
// //

View File

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