From a394c339a23f1c02b0a966b835c4a84ccb27c479 Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Mon, 20 May 2024 11:59:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=20=E5=BC=80=E9=94=81?= =?UTF-8?q?=E9=A1=B5-=E8=80=83=E5=8B=A4-=E8=AE=BE=E7=BD=AE=20=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E5=90=8D=E7=A7=B0=20=E9=95=BF=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=EF=BC=8C=E9=80=9A=E9=80=9A?= =?UTF-8?q?=E9=94=81=E6=98=BE=E7=A4=BA2=E6=A0=8F=E3=80=82=E5=8F=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AA=E5=81=9A=E9=95=BF=E5=BA=A6=E9=99=90?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E5=BA=94=E9=99=90=E5=88=B66-30=E4=BD=8D?= =?UTF-8?q?=EF=BC=8C=E5=92=8C=E5=88=9B=E5=BB=BA=E4=B8=80=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/lan/lan_en.json | 3 +- images/lan/lan_keys.json | 3 +- images/lan/lan_zh.json | 23 +-- .../checkingInSet/checkingInSet_page.dart | 78 +++++---- .../checkingInSet/checkingInSet_state.dart | 32 ++-- .../checkingInAddStaff_page.dart | 8 +- .../checkingInAddStaff_state.dart | 67 ++++---- lib/tools/commonItem.dart | 162 ++++++++---------- lib/tools/showTFView.dart | 1 + 9 files changed, 195 insertions(+), 182 deletions(-) diff --git a/images/lan/lan_en.json b/images/lan/lan_en.json index 2898b9b3..f0754730 100755 --- a/images/lan/lan_en.json +++ b/images/lan/lan_en.json @@ -855,5 +855,6 @@ "门铃事件":"Doorbell event", "视频事件":"Video event", "请开启蓝牙":"Please turn on Bluetooth", - "请选择有效日":"Please select the effective day" + "请选择有效日":"Please select the effective day", + "公司名字长度不能小于 6 ": "The length of the company name cannot be less than 6" } diff --git a/images/lan/lan_keys.json b/images/lan/lan_keys.json index 3f091d55..9e5a1a1d 100755 --- a/images/lan/lan_keys.json +++ b/images/lan/lan_keys.json @@ -884,5 +884,6 @@ "门铃事件":"门铃事件", "视频事件":"视频事件", "请开启蓝牙":"请开启蓝牙", - "请选择有效日":"请选择有效日" + "请选择有效日":"请选择有效日", + "公司名字长度不能小于 6 ": "公司名字长度不能小于 6 " } diff --git a/images/lan/lan_zh.json b/images/lan/lan_zh.json index c47e1cc2..83529ac4 100755 --- a/images/lan/lan_zh.json +++ b/images/lan/lan_zh.json @@ -815,7 +815,7 @@ "身份证号": "身份证号", "请输入真实姓名": "请输入真实姓名", "请输入身份证号": "请输入身份证号", - "请输入身份证号和真实姓名":"请输入身份证号和真实姓名", + "请输入身份证号和真实姓名": "请输入身份证号和真实姓名", "点击返回设备配对": "点击返回设备配对", "无法连接?尝试升级": "无法连接?尝试升级", "固件升级提示": "固件升级提示", @@ -845,14 +845,15 @@ "操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。": "操作失败,请确认锁是否在附近,或重启手机蓝牙后再试。", "如果是全自动锁,请使屏幕变亮": "如果是全自动锁,请使屏幕变亮", "正在尝试闭锁……": "正在尝试闭锁……", - "清空记录":"清空记录", - "是否要删除操作记录?":"是否要删除操作记录?", - "被删除的记录不能恢复":"被删除的记录不能恢复", - "全部事件":"全部事件", - "开锁事件":"开锁事件", - "异常事件":"异常事件", - "门铃事件":"门铃事件", - "视频事件":"视频事件", - "请开启蓝牙":"请开启蓝牙", - "请选择有效日":"请选择有效日" + "清空记录": "清空记录", + "是否要删除操作记录?": "是否要删除操作记录?", + "被删除的记录不能恢复": "被删除的记录不能恢复", + "全部事件": "全部事件", + "开锁事件": "开锁事件", + "异常事件": "异常事件", + "门铃事件": "门铃事件", + "视频事件": "视频事件", + "请开启蓝牙": "请开启蓝牙", + "请选择有效日": "请选择有效日", + "公司名字长度不能小于 6 ": "公司名字长度不能小于 6 " } diff --git a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 0cf124c0..da4c5f2c 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -4,6 +4,7 @@ import 'package:flutter/services.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/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart'; import '../../../../appRouters.dart'; import '../../../../tools/commonItem.dart'; @@ -22,8 +23,8 @@ class CheckingInSetPage extends StatefulWidget { } class _CheckingInSetPageState extends State { - final logic = Get.put(CheckingInSetLogic()); - final state = Get.find().state; + final CheckingInSetLogic logic = Get.put(CheckingInSetLogic()); + final CheckingInSetState state = Get.find().state; @override Widget build(BuildContext context) { @@ -31,17 +32,17 @@ class _CheckingInSetPageState extends State { backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( barTitle: - "${TranslationLoader.lanKeys!.checkingIn!.tr}${TranslationLoader.lanKeys!.set!.tr}", + '${TranslationLoader.lanKeys!.checkingIn!.tr}${TranslationLoader.lanKeys!.set!.tr}', haveBack: true, backgroundColor: AppColors.mainColor), body: Column( - children: [ + children: [ Obx(() => CommonItem( leftTitel: - "公司名称".tr, - // rightTitle: state.companyName.value ?? "", - isHaveRightWidget: true, - rightWidget: getTFWidget(), + '公司名称'.tr, + rightTitle: state.companyName.value ?? '', + // isHaveRightWidget: true, + // rightWidget: getTFWidget(), isHaveLine: true, isHaveDirection: true, action: () { @@ -53,23 +54,23 @@ class _CheckingInSetPageState extends State { isHaveLine: true, isHaveDirection: true, action: () { - Get.toNamed(Routers.checkingInStaffManagePage, arguments: { - "getKeyInfosData": state.getKeyInfosData.value, - "companyId": state.companyId.value + Get.toNamed(Routers.checkingInStaffManagePage, arguments: { + 'getKeyInfosData': state.getKeyInfosData.value, + 'companyId': state.companyId.value }); })), Obx(() => CommonItem( leftTitel: "${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}", - rightTitle: (state.beginTime.value.isNotEmpty) ? "${state.beginTime.value} - ${state.endTime.value}" : "", + rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '', isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: { + var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: { // "getKeyInfosData": state.getKeyInfosData.value, - "companyId": state.companyId.value, - "pushType": "2", - "checkingInSetInfo": state.checkingInSetInfo.value, + 'companyId': state.companyId.value, + 'pushType': '2', + 'checkingInSetInfo': state.checkingInSetInfo.value, }); if(data != null) { setState(() { @@ -84,30 +85,30 @@ class _CheckingInSetPageState extends State { Obx(() => CommonItem( leftTitel: "${TranslationLoader.lanKeys!.workday!.tr}${TranslationLoader.lanKeys!.set!.tr}", - rightTitle: state.isCustom.value == true ? state.weekDaysStr.value : (state.weekDaysStr.value.length == 5 ? "单休" : "双休"), + rightTitle: state.isCustom.value == true ? state.weekDaysStr.value : (state.weekDaysStr.value.length == 5 ? '单休' : '双休'), isHaveLine: true, isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: { - "getKeyInfosData": state.getKeyInfosData.value, - "companyId": state.companyId.value, - "pushType": "2", - "checkingInSetInfo": state.checkingInSetInfo.value, + var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: { + 'getKeyInfosData': state.getKeyInfosData.value, + 'companyId': state.companyId.value, + 'pushType': '2', + 'checkingInSetInfo': state.checkingInSetInfo.value, }); if(data != null) { - state.isCustom.value = data["attendanceType"]; - state.weekDays.value = data["weekDays"]; - state.weekDaysStr.value = state.weekDays.value.join(","); + state.isCustom.value = data['attendanceType']; + state.weekDays.value = data['weekDays']; + state.weekDaysStr.value = state.weekDays.value.join(','); } })), CommonItem( leftTitel: TranslationLoader.lanKeys!.holidays!.tr, - rightTitle: "", + rightTitle: '', isHaveLine: false, isHaveDirection: true, action: () { - Get.toNamed(Routers.checkingInSetHolidaysPage, arguments: { - "companyId": state.companyId.value + Get.toNamed(Routers.checkingInSetHolidaysPage, arguments: { + 'companyId': state.companyId.value }); }), SizedBox( @@ -117,14 +118,14 @@ class _CheckingInSetPageState extends State { visible: state.getKeyInfosData.value.isLockOwner == 1, child: SubmitBtn( btnName: - "${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}", + '${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}', borderRadius: 20.w, fontSize: 32.sp, isDelete: true, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), onClick: () { - ShowTipView().showIosTipWithContentDialog("是否删除?".tr, () { + ShowTipView().showIosTipWithContentDialog('是否删除?'.tr, () { logic.deletCompanyData(); }); // showDeletCompanyAlertDialog(context); @@ -140,12 +141,19 @@ class _CheckingInSetPageState extends State { context: context, builder: (BuildContext context) { return ShowTFView( - title: "修改公司名字".tr, - tipTitle: "", + title: '修改公司名字'.tr, + tipTitle: '', controller: state.changeNameController, + inputFormatters: [ + LengthLimitingTextInputFormatter(30), + ], sureClick: () { if(state.changeNameController.text.isEmpty){ - logic.showToast("请输入公司名字".tr); + logic.showToast('请输入公司名字'.tr); + return; + } + if(state.changeNameController.text.length <6){ + logic.showToast('公司名字长度不能小于 6 '.tr); return; } Get.back(); @@ -159,7 +167,7 @@ class _CheckingInSetPageState extends State { // 接受者信息输入框 Widget getTFWidget() { - state.nameController.text = state.companyName.value ?? ""; + state.nameController.text = state.companyName.value ?? ''; return Container( // color: Colors.red, height: 65.h, @@ -168,7 +176,7 @@ class _CheckingInSetPageState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, - children: [ + children: [ Expanded( child: TextField( //输入框一行 diff --git a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart index 476e3c51..89b334f6 100755 --- a/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart +++ b/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_state.dart @@ -6,28 +6,28 @@ import '../../../lockMian/entity/lockListInfo_entity.dart'; import 'checkingInSet_entity.dart'; class CheckingInSetState{ - final getKeyInfosData = LockListInfoItemEntity().obs; - final companyId = "".obs; + CheckingInSetState() { + Map map = Get.arguments; + getKeyInfosData.value = map['getKeyInfosData']; + } + final Rx getKeyInfosData = LockListInfoItemEntity().obs; + final RxString companyId = ''.obs; - var isCustom = false.obs; + RxBool isCustom = false.obs; - var weekDays = [].obs;// 工作天数 - var weekDaysStr = "".obs;// 拼接显示的字符串天数 + RxList weekDays = [].obs;// 工作天数 + RxString weekDaysStr = ''.obs;// 拼接显示的字符串天数 - var beginTime = "".obs;// 开始时间 - var endTime = "".obs;// 结束时间 - var beginTimeTimestamp = "".obs;// 开始时间时间戳 - var endTimeTimestamp = "".obs;// 结束时间时间戳 + RxString beginTime = ''.obs;// 开始时间 + RxString endTime = ''.obs;// 结束时间 + RxString beginTimeTimestamp = ''.obs;// 开始时间时间戳 + RxString endTimeTimestamp = ''.obs;// 结束时间时间戳 - var staffNumber = "".obs;// 员工数量 - var companyName = "".obs;// 公司名称 + RxString staffNumber = ''.obs;// 员工数量 + RxString companyName = ''.obs;// 公司名称 final TextEditingController changeNameController = TextEditingController(); final TextEditingController nameController = TextEditingController(); - final checkingInSetInfo = CheckingInSetInfo().obs; - CheckingInSetState() { - Map map = Get.arguments; - getKeyInfosData.value = map["getKeyInfosData"]; - } + final Rx checkingInSetInfo = CheckingInSetInfo().obs; } \ No newline at end of file diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart index 0376b3a1..e8aee62b 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -5,6 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaffSelectKey_entity.dart'; import 'package:star_lock/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart'; +import 'package:star_lock/tools/commonDataManage.dart'; import '../../../../../appRouters.dart'; import '../../../../../app_settings/app_colors.dart'; @@ -45,7 +46,7 @@ class _CheckingInAddStaffPageState extends State { isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget( - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.name!.tr}", + '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.name!.tr}', state.staffNameController)), // 选择打卡方式 Obx(() => CommonItem( @@ -60,7 +61,10 @@ class _CheckingInAddStaffPageState extends State { '卡'.tr, '指纹'.tr ]; - if (state.getKeyInfosData.value.lockName!.contains('T9A')) { + + // if (state.getKeyInfosData.value.lockName!.contains('T9A')) { + if (CommonDataManage().currentKeyInfo.lockFeature?.d3Face == + 1) { list.add('人脸'.tr); } _showSelectClockInType(list, list, list, '1', '选择钥匙'.tr); diff --git a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart index dd23cda8..1a939a7a 100755 --- a/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart +++ b/lib/main/lockDetail/checkingIn/checkingInStaff/checkingInSetAddStaff/checkingInAddStaff_state.dart @@ -6,38 +6,9 @@ import '../checkingInSetStaffList/checkingInStaffList_entity.dart'; import 'checkingInAddStaffSelectKey_entity.dart'; class CheckingInAddStaffState { - final Rx getKeyInfosData = LockListInfoItemEntity().obs; - final RxString companyId = ''.obs; - final Rx staffListItemData = CheckingInAddStaffListItemEntity().obs; - - final TextEditingController staffNameController = TextEditingController(); - final TextEditingController staffAccountController = TextEditingController(); - - final RxString selectPrintingMethodType = '1'.obs; // 选择打卡类型 1APP 2密码 3卡 4指纹 5人脸 - final RxString selectPrintingMethodStr = 'APP'.obs; // 选择打卡类型字符串 - - final RxString countryName = '中国'.tr.obs; - final RxString countryCode = '86'.obs; - - final RxBool appUnHaveAccount = true.obs; // 默认没有账号 - final RxList keyEntity = [].obs; // 选择钥匙数据 - - final RxString isAdd = '1'.obs; // 1添加 2编辑 - final RxString attendanceWayName = ''.obs; - final RxString attendanceWayNumber = ''.obs; - final RxBool isCanClick = false.obs; - RxString staffName = ''.obs; - RxString staffAccount = ''.obs; - - bool get staffNameIsNotEmpty => staffName.value.isNotEmpty; - - bool get staffAccountIsNotEmpty => staffAccount.value.isNotEmpty; - - bool get attendanceWayNumberIsNotEmpty => - attendanceWayNumber.value.isNotEmpty; CheckingInAddStaffState() { - Map map = Get.arguments; + final Map map = Get.arguments; getKeyInfosData.value = map['getKeyInfosData']; companyId.value = map['companyId']; @@ -61,6 +32,9 @@ class CheckingInAddStaffState { case 4: selectPrintingMethodStr.value = '指纹'.tr; break; + case 5: + selectPrintingMethodStr.value = '人脸'.tr; + break; } if (staffListItemData.value.attendanceWay!.isNotEmpty) { @@ -71,4 +45,37 @@ class CheckingInAddStaffState { } } } + final Rx getKeyInfosData = + LockListInfoItemEntity().obs; + final RxString companyId = ''.obs; + final Rx staffListItemData = + CheckingInAddStaffListItemEntity().obs; + + final TextEditingController staffNameController = TextEditingController(); + final TextEditingController staffAccountController = TextEditingController(); + + final RxString selectPrintingMethodType = + '1'.obs; // 选择打卡类型 1APP 2密码 3卡 4指纹 5人脸 + final RxString selectPrintingMethodStr = 'APP'.obs; // 选择打卡类型字符串 + + final RxString countryName = '中国'.tr.obs; + final RxString countryCode = '86'.obs; + + final RxBool appUnHaveAccount = true.obs; // 默认没有账号 + final RxList keyEntity = + [].obs; // 选择钥匙数据 + + final RxString isAdd = '1'.obs; // 1添加 2编辑 + final RxString attendanceWayName = ''.obs; + final RxString attendanceWayNumber = ''.obs; + final RxBool isCanClick = false.obs; + RxString staffName = ''.obs; + RxString staffAccount = ''.obs; + + bool get staffNameIsNotEmpty => staffName.value.isNotEmpty; + + bool get staffAccountIsNotEmpty => staffAccount.value.isNotEmpty; + + bool get attendanceWayNumberIsNotEmpty => + attendanceWayNumber.value.isNotEmpty; } diff --git a/lib/tools/commonItem.dart b/lib/tools/commonItem.dart index 3cf2bf79..f1e20fee 100755 --- a/lib/tools/commonItem.dart +++ b/lib/tools/commonItem.dart @@ -3,6 +3,20 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:star_lock/app_settings/app_colors.dart'; class CommonItem extends StatelessWidget { + CommonItem( + {required this.leftTitel, + Key? key, + this.rightTitle, + this.allHeight, + this.isHaveDirection = false, + this.isHaveLine = false, + this.isHaveRightWidget = false, + this.isPadding = true, + this.rightWidget, + this.isTipsImg, + this.action, + this.tipsImgAction}) + : super(key: key); String? leftTitel; String? rightTitle; bool? isHaveDirection; @@ -15,97 +29,73 @@ class CommonItem extends StatelessWidget { bool? isTipsImg; bool? isPadding; - CommonItem( - {Key? key, - required this.leftTitel, - this.rightTitle, - this.allHeight, - this.isHaveDirection = false, - this.isHaveLine = false, - this.isHaveRightWidget = false, - this.isPadding = true, - this.rightWidget, - this.isTipsImg, - this.action, - this.tipsImgAction}) - : super(key: key); - @override Widget build(BuildContext context) { return GestureDetector( onTap: action, - child: Column( - // mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - height: allHeight ?? 65.h, - color: Colors.white, - padding: isPadding == true ? EdgeInsets.only(left: 20.w, right: 10.w) : EdgeInsets.zero, // , top: 20.w, bottom: 20.w - child: Row( - children: [ - // SizedBox(width: 20.w), - SizedBox( - // width: isHaveRightWidget! ? 100.w : 300.w, - child: Text(leftTitel!, style: TextStyle(fontSize: 22.sp))), - SizedBox(width: 6.w), - isTipsImg == true - ? GestureDetector( - onTap: tipsImgAction, - child: Container( - width: 50.h, - height: 50.h, - padding: EdgeInsets.only(right:10.h, top: 15.h, bottom: 10.h), - child: Image.asset( - 'images/icon_tips_Q.png', - width: 20.w, - height: 20.w, - ), - ), - ) - : Container(), - Expanded(child: SizedBox(width: 10.w)), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - isHaveRightWidget! - ? rightWidget! - : SizedBox( - // width: rightTitle!.isNotEmpty ? 260.w : 0.1.w, - child: Text( - rightTitle ?? "", - textAlign: TextAlign.right, - overflow: TextOverflow.ellipsis, - maxLines: 2, - style: TextStyle( - fontSize: 22.sp, - color: AppColors.darkGrayTextColor), - ), - ), - ], - ), - isHaveDirection! ? SizedBox(width: 15.w) : Container(), - isHaveDirection! - ? Image.asset( - 'images/icon_right_grey.png', - width: 12.w, - height: 21.w, - ) - : SizedBox(width: 10.w), - isHaveDirection! ? SizedBox(width: 5.w) : Container(), - ], - ), - ), - // isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container() - //by DaisyWu - isHaveLine! - ? Divider( - color: AppColors.greyLineColor, - indent: isPadding == true ? 20.w : 0, - endIndent: isPadding == true ? 20.w : 0, - height: 1, + child: Container( + height: allHeight ?? 65.h, + padding: isPadding == true + ? EdgeInsets.only(left: 20.w, right: 10.w) + : EdgeInsets.zero, + decoration: BoxDecoration( + color: Colors.white, + border: isHaveLine! + ? Border( + bottom: BorderSide( + color: AppColors.greyLineColor, // 设置边框颜色 + width: 2.0.h, // 设置边框宽度 + ), ) - : Container() - ], + : null, + ), + child: Row( + children: [ + Text(leftTitel!, style: TextStyle(fontSize: 22.sp)), + SizedBox(width: 6.w), + if (isTipsImg == true) + GestureDetector( + onTap: tipsImgAction, + child: Container( + width: 50.h, + height: 50.h, + padding: + EdgeInsets.only(right: 10.h, top: 15.h, bottom: 10.h), + child: Image.asset( + 'images/icon_tips_Q.png', + width: 20.w, + height: 20.w, + ), + ), + ) + else + Container(), + if (isHaveRightWidget!) ...[ + const Spacer(), + rightWidget! + ] else + Expanded( + child: Text( + rightTitle ?? '', + textAlign: TextAlign.right, + overflow: TextOverflow.ellipsis, + maxLines: 2, + style: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor), + ), + ), + if (isHaveDirection!) SizedBox(width: 15.w) else Container(), + if (isHaveDirection!) + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) + else + SizedBox(width: 10.w), + if (isHaveDirection!) SizedBox(width: 5.w) else Container(), + ], + ), ), ); } diff --git a/lib/tools/showTFView.dart b/lib/tools/showTFView.dart index a21637c0..a3b05179 100755 --- a/lib/tools/showTFView.dart +++ b/lib/tools/showTFView.dart @@ -65,6 +65,7 @@ class ShowTFView extends StatelessWidget { //不需要输入框下划线 border: InputBorder.none, ), + ), ) ],