diff --git a/star_lock/images/icon_recordDate.png b/star_lock/images/icon_recordDate.png new file mode 100644 index 00000000..6b80b0bd Binary files /dev/null and b/star_lock/images/icon_recordDate.png differ diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index b7757b54..a7030dd6 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -1,5 +1,6 @@ import 'package:get/get.dart'; import 'package:star_lock/login/register/starLock_register_binding.dart'; +import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord_page.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart'; import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart'; import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart'; @@ -124,6 +125,7 @@ abstract class Routers { static const lockDetailPage = '/LockDetailPage'; // 锁详情 static const electronicKeyListPage = '/ElectronicKeyListPage'; // 电子钥匙列表 static const electronicKeyDetailPage = '/ElectronicKeyDetailPage'; // 电子钥匙详情 + static const keyOperationRecordPage = '/keyOperationRecordPage'; //钥匙详情-操作记录 static const electronicKeyDetailChangeDate = '/ElectronicKeyDetailChangeDate'; // 修改有效期 static const sendElectronicKeyManagePage = @@ -241,26 +243,32 @@ abstract class Routers { '/ValueAddedServicesListEmailTemplatePage'; // 增值服务-邮箱模版列表 static const valueAddedServicesAddEmailTemplatePage = '/ValueAddedServicesAddEmailTemplatePage'; // 增值服务-自定义邮箱模版 - static const valueAddedServicesBuyAndUseRecordManagePage = '/ValueAddedServicesBuyAndUseRecordManagePage'; // 增值服务-购买使用记录 + static const valueAddedServicesBuyAndUseRecordManagePage = + '/ValueAddedServicesBuyAndUseRecordManagePage'; // 增值服务-购买使用记录 static const lockScreenPage = '/LockScreenPage'; // 我的设置-锁屏 - static const aPPUnlockNeedMobileNetworkingLockPage = '/APPUnlockNeedMobileNetworkingLockPage'; // 我的设置-app开锁时需手机连网的锁 - static const hideInvalidUnlockPermissionsPage = '/HideInvalidUnlockPermissionsPage'; // 我的设置-隐藏无效开锁权限 + static const aPPUnlockNeedMobileNetworkingLockPage = + '/APPUnlockNeedMobileNetworkingLockPage'; // 我的设置-app开锁时需手机连网的锁 + static const hideInvalidUnlockPermissionsPage = + '/HideInvalidUnlockPermissionsPage'; // 我的设置-隐藏无效开锁权限 static const lockUserManageLisPage = '/LockUserManageLisPage'; //我的设置-锁用户管理 - static const authorizedAdministratorListPage = '/AuthorizedAdministratorListPage'; //我的设置-授权管理员 + static const authorizedAdministratorListPage = + '/AuthorizedAdministratorListPage'; //我的设置-授权管理员 static const lockGroupListPage = '/LockGroupListPage'; //我的设置-锁分组 static const lockItemListPage = '/LockItemListPage'; //锁分组-锁列表 static const transferSmartLockPage = '/transferSmartLockPage'; //转移智能锁 static const recipientInformationPage = '/recipientInformationPage'; //接受人信息 static const selectBranchPage = '/SelectBranchPage'; //选择分店 static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关 - static const addAuthorizedAdministratorPage = '/addAuthorizedAdministratorPage'; //添加授权管理员 + static const addAuthorizedAdministratorPage = + '/addAuthorizedAdministratorPage'; //添加授权管理员 static const ownedKeyListPage = '/ownedKeyListPage'; //拥有的钥匙 static const starLockLoginPage = '/StarLockLoginPage'; // 登录 static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册 - static const starLockForgetPasswordPage = '/StarLockForgetPasswordPage'; // 忘记密码 + static const starLockForgetPasswordPage = + '/StarLockForgetPasswordPage'; // 忘记密码 static const seletCountryRegionPage = '/SeletCountryRegionPage'; // 选择国家和地区 static const safetyVerificationPage = '/SafetyVerificationPage'; // 安全验证 } @@ -384,9 +392,9 @@ abstract class AppRouters { page: () => const StarLockLoginPage(), ), GetPage( - name: Routers.starLockRegisterPage, - page: () => const StarLockRegisterPage(), binding:StarLockRegisterBinding() - ), + name: Routers.starLockRegisterPage, + page: () => const StarLockRegisterPage(), + binding: StarLockRegisterBinding()), GetPage( name: Routers.starLockForgetPasswordPage, page: () => const StarLockForgetPasswordPage(), @@ -661,47 +669,38 @@ abstract class AppRouters { ), GetPage( name: Routers.authorizedAdministratorListPage, - page: () => const AuthorizedAdministratorListPage() - ), + page: () => const AuthorizedAdministratorListPage()), GetPage( name: Routers.lockUserManageLisPage, - page: () => const LockUserManageListListPage() - ), + page: () => const LockUserManageListListPage()), GetPage( - name: Routers.lockGroupListPage, page: () => const LockGroupListPage() - ), + name: Routers.lockGroupListPage, page: () => const LockGroupListPage()), GetPage( - name: Routers.lockItemListPage, page: () => const LockItemListPage() - ), + name: Routers.lockItemListPage, page: () => const LockItemListPage()), GetPage( name: Routers.transferSmartLockPage, - page: () => const TransferSmartLockPage() - ), + page: () => const TransferSmartLockPage()), GetPage( name: Routers.recipientInformationPage, - page: () => const RecipientInformationPage() - ), + page: () => const RecipientInformationPage()), GetPage( - name: Routers.selectBranchPage, page: () => const SelectBranchPage() - ), + name: Routers.selectBranchPage, page: () => const SelectBranchPage()), GetPage( name: Routers.selectGetewayListPage, - page: () => const SelectGetewayListPage() - ), + page: () => const SelectGetewayListPage()), GetPage( name: Routers.minePersonInfoEditEmailPage, - page: () => const MinePersonInfoEditEmailPage() - ), + page: () => const MinePersonInfoEditEmailPage()), GetPage( name: Routers.addAuthorizedAdministratorPage, - page: () => const AddAuthorizedAdministratorPage() - ), + page: () => const AddAuthorizedAdministratorPage()), GetPage( name: Routers.safetyVerificationPage, - page: () => const SafetyVerificationPage() - ), + page: () => const SafetyVerificationPage()), GetPage( - name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage() - ) + name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage()), + GetPage( + name: Routers.keyOperationRecordPage, + page: () => const KeyOperationRecordPage()) ]; } diff --git a/star_lock/lib/app_settings/app_colors.dart b/star_lock/lib/app_settings/app_colors.dart index 8131ca39..434f88cb 100644 --- a/star_lock/lib/app_settings/app_colors.dart +++ b/star_lock/lib/app_settings/app_colors.dart @@ -115,7 +115,7 @@ class AppColors { static Color progressBgColor = const Color(0xFF022345); static Color progressValueColor = const Color(0xFF0093E5); - static const greyLineColor = Color.fromRGBO(220, 220, 220, 1); //灰色分割线 + static const greyLineColor = Color.fromRGBO(240, 240, 240, 1); //灰色分割线220 static const darkGrayTextColor = Color.fromRGBO(65, 65, 65, 1); //深灰色字体 static const placeholderTextColor = Color.fromRGBO(128, 128, 128, 1); //占位字体颜色 static const greyBackgroundColor = Color.fromRGBO(240, 240, 240, 1); //灰色背景色 diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart index 68ea892f..94634c33 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart @@ -115,7 +115,7 @@ class _AuthorizedAdminPageState extends State { leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: Container(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 10.h), ], diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart index 42610e94..7de67ee0 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -41,40 +41,12 @@ class _AuthorizedAdminListPageState extends State { SizedBox( height: 20.h, ), - GestureDetector( - child: Container( - height: 80.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'images/icon_btn_add.png', - width: 28.w, - height: 28.w, - ), - SizedBox( - width: 6.w, - ), - Text( - TranslationLoader.lanKeys!.addAuthorizedAdmin!.tr, - style: TextStyle( - color: AppColors.mainColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold), - ) - ], - ), - ), - onTap: () { + AddBottomWhiteBtn( + btnName: TranslationLoader.lanKeys!.addAuthorizedAdmin!.tr, + onClick: () { Navigator.pushNamed(context, Routers.authorizedAdminManagePage); }, ), - // SubmitBtn( // btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr, // onClick: () { @@ -140,7 +112,7 @@ class _AuthorizedAdminListPageState extends State { ), Container( padding: EdgeInsets.only( - left: 4.w, right: 4.w, top: 2.w, bottom: 2.w), + left: 4.w, right: 4.w, top: 1.w, bottom: 1.w), decoration: BoxDecoration( color: AppColors.toBeReceiveBgColor, borderRadius: BorderRadius.circular(5.0), diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart index 39dc559e..88a87153 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLock_page.dart @@ -122,7 +122,7 @@ class _VolumeAuthorizationLockPageState leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 10.h), ], diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart index af85fa6e..db3602ee 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_page.dart @@ -27,7 +27,7 @@ class _CheckingInDetailPageState extends State { _setDatas(year: _year, month: _month); //设置模拟数据,日历月事件,可根据接口返回的结果 - _loadAttendanceMonthRecord( "$_year-$_month"); + _loadAttendanceMonthRecord("$_year-$_month"); //日历日事件 _loadAttendanceDayRecord("$_year-$_month-$_day"); @@ -36,12 +36,18 @@ class _CheckingInDetailPageState extends State { //加载月历事件,请求接口 _loadAttendanceMonthRecord(String dateTime) async { - CalendarModel bean1 = CalendarModel(year: _year,month: _month,day: 1,workType: "2"); - CalendarModel bean2 = CalendarModel(year: _year,month: _month,day: 2,workType: "1"); - CalendarModel bean3 = CalendarModel(year: _year,month: _month,day: 3,workType: "2"); - CalendarModel bean4 = CalendarModel(year: _year,month: _month,day: 4,workType: "0"); - CalendarModel bean5 = CalendarModel(year: _year,month: _month,day: 5,workType: "0"); - CalendarModel bean6 = CalendarModel(year: _year,month: _month,day: 6,workType: "1"); + CalendarModel bean1 = + CalendarModel(year: _year, month: _month, day: 1, workType: "2"); + CalendarModel bean2 = + CalendarModel(year: _year, month: _month, day: 2, workType: "1"); + CalendarModel bean3 = + CalendarModel(year: _year, month: _month, day: 3, workType: "2"); + CalendarModel bean4 = + CalendarModel(year: _year, month: _month, day: 4, workType: "0"); + CalendarModel bean5 = + CalendarModel(year: _year, month: _month, day: 5, workType: "0"); + CalendarModel bean6 = + CalendarModel(year: _year, month: _month, day: 6, workType: "1"); _listDatas.add(bean1); _listDatas.add(bean2); _listDatas.add(bean3); @@ -52,7 +58,7 @@ class _CheckingInDetailPageState extends State { setState(() { for (int i = 0; i < _datas.length; i++) { for (int j = 0; j < _listDatas.length; j++) { - if (_datas[i].year== _listDatas[j].year && + if (_datas[i].year == _listDatas[j].year && _datas[i].month == _listDatas[j].month && _datas[i].day == _listDatas[j].day) { _datas[i].workType = _listDatas[j].workType; @@ -63,40 +69,44 @@ class _CheckingInDetailPageState extends State { } //加载日事件,请求接口 - _loadAttendanceDayRecord(String dateTime) async{ + _loadAttendanceDayRecord(String dateTime) async { //可根据接口返回的内容在日历下面打卡信息或者其余内容 print("点击的是$dateTime"); } + @override Widget build(BuildContext context) { return Scaffold( - appBar: TitleAppBar(barTitle:"张三", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: "张三", + haveBack: true, + backgroundColor: AppColors.mainColor), body: SingleChildScrollView( child: Column( - children: [ - Container( - // margin: EdgeInsets.all(20.sp), - decoration: BoxDecoration( - //设置颜色 - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(12.r)), - //设置四周边框 - ), - child: Column( - children: [ - _yearHeader(), - SizedBox(height: 10.h), - _weekHeader(), - _everyDay(), - _bottomStatisticsWidget() - ], - ), - ), + children: [ + Container( + // margin: EdgeInsets.all(20.sp), + decoration: BoxDecoration( + //设置颜色 + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(12.r)), + //设置四周边框 + ), + child: Column( + children: [ + _yearHeader(), + SizedBox(height: 10.h), + _weekHeader(), + _everyDay(), + _bottomStatisticsWidget() + ], + ), + ), - //下面可以添加日事件中的信息,例如打卡信息 - Container(), - ], - ))); + //下面可以添加日事件中的信息,例如打卡信息 + Container(), + ], + ))); } //头部年 @@ -120,9 +130,17 @@ class _CheckingInDetailPageState extends State { ), ), ), - SizedBox(width: 60.w,), - Text("$_year-$_month", style: TextStyle(fontSize: 34.sp, color: Colors.black, fontWeight: FontWeight.w500)), - SizedBox(width: 60.w,), + SizedBox( + width: 60.w, + ), + Text("$_year-$_month", + style: TextStyle( + fontSize: 34.sp, + color: Colors.black, + fontWeight: FontWeight.w500)), + SizedBox( + width: 60.w, + ), GestureDetector( onTap: () { _nextMonth(); @@ -150,7 +168,8 @@ class _CheckingInDetailPageState extends State { TranslationLoader.lanKeys!.thursdayShort!.tr, TranslationLoader.lanKeys!.fridayShort!.tr, TranslationLoader.lanKeys!.saturdayShort!.tr, - TranslationLoader.lanKeys!.sundayShort!.tr]; + TranslationLoader.lanKeys!.sundayShort!.tr + ]; return Container( height: 50.h, child: GridView.builder( @@ -159,7 +178,7 @@ class _CheckingInDetailPageState extends State { shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - //横轴元素个数 + //横轴元素个数 crossAxisCount: 7, //纵轴间距 // mainAxisSpacing: ScreenUtil().setHeight(10), @@ -192,7 +211,7 @@ class _CheckingInDetailPageState extends State { shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - //横轴元素个数 + //横轴元素个数 crossAxisCount: 7, // //纵轴间距 // mainAxisSpacing: ScreenUtil().setHeight(10), @@ -213,7 +232,8 @@ class _CheckingInDetailPageState extends State { _datas[i].isSelect = true; //加载选中的日期事件 - _loadAttendanceDayRecord( "${_datas[i].year}-${_datas[i].month}-${_datas[i].day}"); + _loadAttendanceDayRecord( + "${_datas[i].year}-${_datas[i].month}-${_datas[i].day}"); } else { _datas[i].isSelect = false; } @@ -233,9 +253,9 @@ class _CheckingInDetailPageState extends State { //设置底部背景 decoration: _datas[index].isSelect! ? const BoxDecoration( - color: Color(0xFF2C91F6), - shape: BoxShape.circle, - ) + color: Color(0xFF2C91F6), + shape: BoxShape.circle, + ) : const BoxDecoration(), child: Center( child: Text( @@ -247,29 +267,31 @@ class _CheckingInDetailPageState extends State { //设置选中字体颜色,以及周末和工作日颜色 style: _datas[index].isSelect! ? TextStyle( - fontSize: 32.sp, color: const Color(0xFFFFFFFF)) + fontSize: 32.sp, color: const Color(0xFFFFFFFF)) : (index % 7 == 5 || index % 7 == 6 - ? TextStyle( - fontSize: 32.sp, color: const Color(0xFFC4C8D0)) - : TextStyle( - fontSize: 32.sp, color: const Color(0xFF3C3E43))), + ? TextStyle( + fontSize: 32.sp, + color: const Color(0xFFC4C8D0)) + : TextStyle( + fontSize: 32.sp, + color: const Color(0xFF3C3E43))), ), ), ), const SizedBox(height: 5), //设置底部小圆点,非当前月的不显示,设置为透明,其余的根据状态判断显示 _datas[index].month == _month && - _datas[index].workType != "" && - _datas[index].workType != "0" + _datas[index].workType != "" && + _datas[index].workType != "0" ? Container( - height: 6.0, - width: 6.0, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _datas[index].workType == "1" - ? const Color(0xFFF48835) - : const Color(0xFF2C91F6)), - ) + height: 6.0, + width: 6.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: _datas[index].workType == "1" + ? const Color(0xFFF48835) + : const Color(0xFF2C91F6)), + ) : Container(), ], ), @@ -280,7 +302,7 @@ class _CheckingInDetailPageState extends State { ); } - Widget _bottomStatisticsWidget(){ + Widget _bottomStatisticsWidget() { return Column( children: [ Row( @@ -288,45 +310,64 @@ class _CheckingInDetailPageState extends State { Container( width: 1.sw, // height: 40.h, - padding: EdgeInsets.only(left: 50.w,top: 5.h, bottom: 5.h), + padding: EdgeInsets.only(left: 50.w, top: 5.h, bottom: 5.h), color: Colors.grey, - child: Text("月统计", style: TextStyle(color: Colors.white, fontSize: 32.sp, fontWeight: FontWeight.w500),), + child: Text( + "月统计", + style: TextStyle( + color: Colors.white, + fontSize: 32.sp, + fontWeight: FontWeight.w500), + ), ), ], ), - _bottomStatisticsItemWidget(Colors.red ,"迟到", "0"), - _bottomStatisticsItemWidget(Colors.orange ,"早退", "0"), - _bottomStatisticsItemWidget(Colors.grey ,"未打卡", "0"), + _bottomStatisticsItemWidget(Colors.red, "迟到", "0"), + _bottomStatisticsItemWidget(Colors.orange, "早退", "0"), + _bottomStatisticsItemWidget(Colors.grey, "未打卡", "0"), ], ); } - Widget _bottomStatisticsItemWidget(Color color,String leftTitel, String rightTitle,){ + Widget _bottomStatisticsItemWidget( + Color color, + String leftTitel, + String rightTitle, + ) { return Column( children: [ Container( height: 70.h, - padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w), + padding: + EdgeInsets.only(left: 20.w, right: 10.w, top: 20.w, bottom: 20.w), child: Row( children: [ - SizedBox(width:20.w), + SizedBox(width: 20.w), Container( width: 35.w, height: 35.w, decoration: BoxDecoration( color: color, - borderRadius:BorderRadius.all(Radius.circular(35.h)) - ), + borderRadius: BorderRadius.all(Radius.circular(35.h))), ), - SizedBox(width:20.w), - Expanded(child: Text(leftTitel, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))), - SizedBox(width:20.w), - Text(rightTitle, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500)), - SizedBox(width:10.w), + SizedBox(width: 20.w), + Expanded( + child: Text(leftTitel, + style: TextStyle( + fontSize: 28.sp, fontWeight: FontWeight.w500))), + SizedBox(width: 20.w), + Text(rightTitle, + textAlign: TextAlign.end, + style: + TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500)), + SizedBox(width: 10.w), ], ), ), - Container(height: 0.5.h, color: Colors.grey,) + Container( + height: 0.5.h, + color: Colors.grey, + ) ], ); } @@ -424,7 +465,7 @@ class _CheckingInDetailPageState extends State { nextMonth = 1; } var nextPlaceholderDays = - _getPlaceholderDays(year: nextYear, month: nextMonth); + _getPlaceholderDays(year: nextYear, month: nextMonth); for (var i = 0; i < 7 - nextPlaceholderDays; i++) { _datas.add(CalendarModel( year: nextYear, @@ -448,7 +489,7 @@ class _CheckingInDetailPageState extends State { _datas.clear(); _setDatas(year: _year, month: _month); //更新月历事件 - _loadAttendanceMonthRecord( "$_year-$_month"); + _loadAttendanceMonthRecord("$_year-$_month"); //更新日事件 _loadAttendanceDayRecord("$_year-$_month-$_day"); }); @@ -456,12 +497,15 @@ class _CheckingInDetailPageState extends State { // 下月 _nextMonth() { - if(_month==12){//当前月是12月,下一个月就是下一年 - if(DateTime.now().year>=_year+1){//判断下一年是否大于当前年 + if (_month == 12) { + //当前月是12月,下一个月就是下一年 + if (DateTime.now().year >= _year + 1) { + //判断下一年是否大于当前年 _setNextMonthData(); } - }else{//当前月不是12月,还处于当前年 - if(DateTime.now().month>=_month+1){ + } else { + //当前月不是12月,还处于当前年 + if (DateTime.now().month >= _month + 1) { //判断下一个月是否超过当前月,超过当前月不做操作 _setNextMonthData(); } @@ -469,7 +513,7 @@ class _CheckingInDetailPageState extends State { } //设置下个月的数据 - _setNextMonthData(){ + _setNextMonthData() { setState(() { if (_month == 12) { _year = _year + 1; @@ -487,7 +531,7 @@ class _CheckingInDetailPageState extends State { _datas.clear(); _setDatas(year: _year, month: _month); //更新月历事件 - _loadAttendanceMonthRecord( "$_year-$_month"); + _loadAttendanceMonthRecord("$_year-$_month"); //更新日事件 _loadAttendanceDayRecord("$_year-$_month-$_day"); }); @@ -499,9 +543,9 @@ class CalendarModel { int? year; int? month; int? day; - String? workType = "";//日期事件,0,休息,1,异常,2,正常 + String? workType = ""; //日期事件,0,休息,1,异常,2,正常 bool? isSelect = false; CalendarModel( {this.year, this.month, this.day, this.isSelect, this.workType}); -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 4c3b1fc7..e269a1af 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -55,10 +55,12 @@ class _ElectronicKeyDetailPageState extends State { leftTitel: TranslationLoader.lanKeys!.receiver!.tr, rightTitle: "786612630@qq.com", action: () {}), + const SizedBox(height: 1), CommonItem( leftTitel: TranslationLoader.lanKeys!.sender!.tr, rightTitle: "15080825640", action: () {}), + const SizedBox(height: 1), CommonItem( leftTitel: TranslationLoader.lanKeys!.senderTime!.tr, rightTitle: "2020.06.21 11:49", @@ -68,14 +70,16 @@ class _ElectronicKeyDetailPageState extends State { leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: Container(width: 80.w, child: _switch()), + rightWidget: SizedBox(width: 60.w, child: _switch()), action: () {}), Container(height: 10.h), CommonItem( leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle: "", isHaveDirection: true, - action: () {}), + action: () { + Navigator.pushNamed(context, Routers.keyOperationRecordPage); + }), Container(height: 40.h), SubmitBtn( btnName: TranslationLoader.lanKeys!.delete!.tr, diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord_page.dart new file mode 100644 index 00000000..ee6d494b --- /dev/null +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord_page.dart @@ -0,0 +1,83 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/submitBtn.dart'; +import '../../../../tools/titleAppBar.dart'; +import '../../../../translations/trans_lib.dart'; + +class KeyOperationRecordPage extends StatefulWidget { + const KeyOperationRecordPage({Key? key}) : super(key: key); + + @override + State createState() => _KeyOperationRecordPageState(); +} + +class _KeyOperationRecordPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + ), + body: Column( + children: [ + Expanded(child: _buildMainUI()), + ], + ), + ); + } + + Widget _buildMainUI() { + return ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem('images/icon_recordDate.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () {}); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); + } + + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { + return GestureDetector( + onTap: action, + child: Container( + color: Colors.white, + height: 68.h, + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + lockTypeIcon, + width: 24.w, + height: 24.w, + color: AppColors.darkGrayTextColor, + ), + SizedBox( + width: 20.w, + ), + Text( + '2023-07-29 14:50:33 开锁', + style: TextStyle(color: AppColors.blackColor, fontSize: 20.sp), + ), + SizedBox(width: 20.h), + ], + ), + ), + ); + } +} diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart index f6be6213..ea3a3666 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -41,36 +41,9 @@ class _ElectronicKeyListPageState extends State { height: 20.h, ), Expanded(child: _buildMainUI()), - GestureDetector( - child: Container( - height: 80.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'images/icon_btn_add.png', - width: 28.w, - height: 28.w, - ), - SizedBox( - width: 6.w, - ), - Text( - TranslationLoader.lanKeys!.sendKey!.tr, - style: TextStyle( - color: AppColors.mainColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold), - ) - ], - ), - ), - onTap: () { + AddBottomWhiteBtn( + btnName: TranslationLoader.lanKeys!.sendKey!.tr, + onClick: () { Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage); }, ), diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart index 3648016a..ad86da0a 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyPeriodValidity/electronicKeyPeriodValidity_page.dart @@ -29,8 +29,16 @@ class _ElectronicKeyPeriodValidityPageState body: Column( children: [ topWidget(), - SizedBox( - height: 1.h, + // SizedBox( + // height: 1.h, + // ), + Container( + color: Colors.white, + height: 10.h, + ), + const Divider( + height: 1, + color: AppColors.greyLineColor, ), bottomWidget() ], @@ -53,7 +61,7 @@ class _ElectronicKeyPeriodValidityPageState style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))), SizedBox( - height: 80.h, + height: 90.h, child: GridView.builder( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 7, childAspectRatio: 1.0), diff --git a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart index b5493abc..97657a9f 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/massSendElectronicKey/massSendElectronicKey_page.dart @@ -50,7 +50,6 @@ class _MassSendElectronicKeyPageState extends State { ], ); } - break; case 1: { // 永久 @@ -62,7 +61,6 @@ class _MassSendElectronicKeyPageState extends State { ], ); } - break; case 2: { // 单次 @@ -75,10 +73,8 @@ class _MassSendElectronicKeyPageState extends State { ], ); } - break; default: return Container(); - break; } } @@ -128,7 +124,7 @@ class _MassSendElectronicKeyPageState extends State { leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: Container(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 40.h), ], diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart index e8b47813..cbacc03c 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/sendElectronicKey_page.dart @@ -148,7 +148,7 @@ class _SendElectronicKeyPageState extends State { rightTitle: "", isTipsImg: true, isHaveRightWidget: true, - rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), ], ); @@ -337,7 +337,7 @@ class _SendElectronicKeyPageState extends State { leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 10.h), ], diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart b/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart index ce1ac181..fec53621 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart @@ -20,7 +20,7 @@ class _SendEmailNotificationPageState extends State { @override Widget build(BuildContext context) { _emailController.text = - "请爱的用户 \n\n你收到电子钥匙,请试用APP(www.baidu.com)或小程序开锁 \n\n星锁"; + "亲爱的用户 \n\n你收到电子钥匙,请试用APP(www.baidu.com)或小程序开锁 \n\n星锁"; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, appBar: TitleAppBar( @@ -57,7 +57,7 @@ class _SendEmailNotificationPageState extends State { controller: _emailController, style: TextStyle( color: Colors.black, - fontSize: 28.sp, + fontSize: 22.sp, ), decoration: InputDecoration( border: OutlineInputBorder( diff --git a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart index b28de007..1dbc43f7 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart @@ -37,7 +37,7 @@ class _AutomaticBlockingPageState extends State { isHaveLine: false, isHaveRightWidget: true, rightWidget: - Container(width: 80.w, height: 50.h, child: _switch())), + SizedBox(width: 60.w, height: 50.h, child: _switch())), Container( height: 10.h, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart index 84c9e4fb..581b8e44 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSet/lockSet_page.dart @@ -205,15 +205,13 @@ class _LockSetPageState extends State { rightTitle: "", isHaveLine: true, isHaveRightWidget: true, - rightWidget: Container( - width: 80.w, height: 50.h, child: _switch())), + rightWidget: SizedBox(width: 60.w, child: _switch())), CommonItem( leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr, rightTitle: "", isHaveLine: false, isHaveRightWidget: true, - rightWidget: Container( - width: 80.w, height: 50.h, child: _switch())), + rightWidget: SizedBox(width: 60.w, child: _switch())), SizedBox( height: 30.h, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart index 0d4719ce..391a7342 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart @@ -33,7 +33,7 @@ class _LockSoundSetPageState extends State { isHaveLine: false, isHaveRightWidget: true, rightWidget: - Container(width: 80.w, height: 50.h, child: _switch())), + SizedBox(width: 60.w, height: 50.h, child: _switch())), Container( height: 10.h, ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart index de5cc7d4..9d70a881 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart @@ -33,7 +33,7 @@ class _NormallyOpenModePageState extends State { isHaveLine: false, isHaveRightWidget: true, rightWidget: - Container(width: 80.w, height: 50.h, child: _switch())), + SizedBox(width: 60.w, height: 50.h, child: _switch())), Container( height: 10.h, ), @@ -83,7 +83,7 @@ class _NormallyOpenModePageState extends State { Widget topWidget() { return Container( - height: 150.h, + height: 160.h, width: 1.sw, color: Colors.white, child: Column( @@ -98,8 +98,8 @@ class _NormallyOpenModePageState extends State { style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))), Container( - height: 90.h, - padding: EdgeInsets.only(left: 10.w, right: 10.w), + height: 100.h, + padding: EdgeInsets.only(left: 10.w, right: 10.w, bottom: 10.h), child: GridView.builder( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 7, childAspectRatio: 1.0), diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 670c7a61..0347d9cc 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -168,8 +168,8 @@ class _LockDetailPageState extends State { } Widget bottomItem(String iconUrl, String name, Function() onClick) { - var width = 40.w; - var height = 36.h; + var width = 42.w; + var height = 42.h; return GestureDetector( onTap: onClick, child: Container( diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart index 5d4c034f..ee7fa89c 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart @@ -42,47 +42,14 @@ class _OtherTypeKeyListPageState extends State { height: 20.h, ), Expanded(child: _buildMainUI(type)), - GestureDetector( - child: Container( - height: 80.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'images/icon_btn_add.png', - width: 28.w, - height: 28.w, - ), - SizedBox( - width: 6.w, - ), - Text( - '${TranslationLoader.lanKeys!.add!.tr}${getAppBarTitle(type)}', - style: TextStyle( - color: AppColors.mainColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold), - ) - ], - ), - ), - onTap: () { + AddBottomWhiteBtn( + btnName: + '${TranslationLoader.lanKeys!.add!.tr}${getAppBarTitle(type)}', + onClick: () { Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, arguments: type); }, ), - // SubmitBtn( - // btnName: - // '${TranslationLoader.lanKeys!.add!.tr}${getAppBarTitle(type)}', - // onClick: () { - // Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, - // arguments: type); - // }), SizedBox( height: 64.h, ) diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart index 00bb1716..5ad07fa5 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart @@ -44,49 +44,12 @@ class _PasswordKeyListPageState extends State { SizedBox( height: 20.h, ), - GestureDetector( - child: Container( - height: 80.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8.w)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'images/icon_btn_add.png', - width: 28.w, - height: 28.w, - ), - SizedBox( - width: 6.w, - ), - Text( - TranslationLoader.lanKeys!.getPassword!.tr, - style: TextStyle( - color: AppColors.mainColor, - fontSize: 24.sp, - fontWeight: FontWeight.bold), - ) - ], - ), - ), - onTap: () { + AddBottomWhiteBtn( + btnName: TranslationLoader.lanKeys!.getPassword!.tr, + onClick: () { Navigator.pushNamed(context, Routers.passwordKeyManagePage); }, ), - - // SubmitBtn( - // btnName: TranslationLoader.lanKeys!.getPassword!.tr, - // borderRadius: 20.w, - // margin: EdgeInsets.only( - // left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), - // padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - // onClick: () { - // Navigator.pushNamed(context, Routers.passwordKeyManagePage); - // }), SizedBox( height: 42.h, ) diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart index 65b02b61..d701cb4b 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKey_perpetual/passwordKey_perpetual_page.dart @@ -181,7 +181,7 @@ class _PasswordKeyPerpetualPageState extends State { rightTitle: "", isHaveRightWidget: true, rightWidget: - Container(width: 80.w, height: 50.h, child: _switch()), + SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 10.h), ], diff --git a/star_lock/lib/main/lockMian/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain_page.dart index 4eac03d3..82e32fa6 100644 --- a/star_lock/lib/main/lockMian/lockMain_page.dart +++ b/star_lock/lib/main/lockMian/lockMain_page.dart @@ -31,7 +31,6 @@ class _StarLockMainState extends State with BaseWidget { @override Widget build(BuildContext context) { - final logic = Get.put(GetxBle()); // Get.lazyPut(()=>GetxBle()); logic.scanner.startScan([]); @@ -44,20 +43,20 @@ class _StarLockMainState extends State with BaseWidget { haveOtherLeftWidget: true, leftWidget: Builder( builder: (context) => IconButton( - icon: Image.asset( - "images/main/mainLeft_menu_icon.png", - color: Colors.white, - width: 44.w, - height: 44.w, - ), - onPressed: () { - Scaffold.of(context).openDrawer(); - }, - )), + icon: Image.asset( + "images/main/mainLeft_menu_icon.png", + color: Colors.white, + width: 44.w, + height: 44.w, + ), + onPressed: () { + Scaffold.of(context).openDrawer(); + }, + )), backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: Text("", style: const TextStyle(color: Colors.white)), + child: const Text("", style: TextStyle(color: Colors.white)), onPressed: () { Navigator.pushNamed(context, Routers.starLockLoginPage); }, @@ -132,7 +131,7 @@ class _StarLockMainState extends State with BaseWidget { ], ), SizedBox( - height: 30.h, + height: 20.h, ), Row( children: [ diff --git a/star_lock/lib/mine/about/about_page.dart b/star_lock/lib/mine/about/about_page.dart index e681e557..f485d664 100644 --- a/star_lock/lib/mine/about/about_page.dart +++ b/star_lock/lib/mine/about/about_page.dart @@ -55,18 +55,36 @@ class _AbountPageState extends State { isHaveLine: false, isHaveDirection: true, action: () {}), + Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 20.w, + ), CommonItem( leftTitel: TranslationLoader.lanKeys!.userAgreement!.tr, rightTitle: "", isHaveLine: false, isHaveDirection: true, action: () {}), + Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 20.w, + ), CommonItem( leftTitel: TranslationLoader.lanKeys!.privacyPolicy!.tr, rightTitle: "", isHaveLine: false, isHaveDirection: true, action: () {}), + Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 20.w, + ), CommonItem( leftTitel: TranslationLoader .lanKeys!.personalInformationCollectionList!.tr, @@ -74,6 +92,12 @@ class _AbountPageState extends State { isHaveLine: false, isHaveDirection: true, action: () {}), + Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 20.w, + ), CommonItem( leftTitel: TranslationLoader .lanKeys!.applicationPermissionDescription!.tr, @@ -81,6 +105,12 @@ class _AbountPageState extends State { isHaveLine: false, isHaveDirection: true, action: () {}), + Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 20.w, + ), CommonItem( leftTitel: TranslationLoader .lanKeys!.thirdPartyInformationSharingList!.tr, diff --git a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart index ad7c8070..8d878c6c 100644 --- a/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart +++ b/star_lock/lib/mine/addLock/nearbyLock/nearbyLock_page.dart @@ -22,14 +22,23 @@ class _NearbyLockPageState extends State { barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, haveBack: true, backgroundColor: AppColors.mainColor), - body: ListView.builder( - itemCount: 20, - itemBuilder: (c, index) { - return nearbyLockItem( - 'images/icon_lockGroup_item.png', "MCBN01-ea9240", () { - Navigator.pushNamed(context, Routers.lockAddressPage); - }); - }), + body: ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return nearbyLockItem( + 'images/icon_lockGroup_item.png', "MCBN01-ea9240", () { + Navigator.pushNamed(context, Routers.lockAddressPage); + }); + }, + separatorBuilder: (BuildContext context, int index) { + return Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 0, + ); + }, + ), ); } @@ -41,15 +50,15 @@ class _NearbyLockPageState extends State { // mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - height: 80.h, + height: 89.h, color: Colors.white, child: Row( children: [ SizedBox(width: 20.w), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 56.w, + height: 56.w, ), SizedBox(width: 20.w), Column( @@ -59,7 +68,7 @@ class _NearbyLockPageState extends State { Text( lockTypeTitle, style: TextStyle( - fontSize: 20.sp, color: AppColors.darkGrayTextColor), + fontSize: 20.sp, color: AppColors.blackColor), ), ], ), @@ -74,17 +83,13 @@ class _NearbyLockPageState extends State { Expanded(child: SizedBox(width: 20.w)), Image.asset( 'images/main/icon_main_addLock.png', - width: 28.w, - height: 28.w, + width: 36.w, + height: 36.w, ), SizedBox(width: 30.w), ], ), ), - Container( - height: 0.5.h, - color: Colors.grey, - ) ], ), ); diff --git a/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart index f7b72ee7..c0ae5903 100644 --- a/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart +++ b/star_lock/lib/mine/gateway/addGateway/gatewayConfigurationWifi/gatewayConfigurationWifi_page.dart @@ -37,7 +37,10 @@ class _GatewayConfigurationWifiPageState color: const Color(0xFFF2F6F9), padding: EdgeInsets.all(15.h), child: Text( - TranslationLoader.lanKeys!.gatewayConfigurationWifiTip!.tr)), + TranslationLoader.lanKeys!.gatewayConfigurationWifiTip!.tr, + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 20.sp), + )), Expanded( child: ListView( children: [ @@ -108,8 +111,8 @@ class _GatewayConfigurationWifiPageState rightTitle: "", isHaveLine: true, isHaveRightWidget: true, - rightWidget: Container( - width: 80.w, height: 50.h, child: _switch())), + rightWidget: SizedBox( + width: 60.w, height: 50.h, child: _switch())), Visibility( visible: true, child: Column( @@ -141,15 +144,18 @@ class _GatewayConfigurationWifiPageState SizedBox( height: 50.h, ), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, - borderRadius: 20.w, - margin: EdgeInsets.only( - left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), - padding: EdgeInsets.only(top: 15.w, bottom: 15.w), - onClick: () { - // Navigator.pushNamed(context, Routers.seletGatewayPage); - }), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, + borderRadius: 20.w, + margin: EdgeInsets.only( + left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), + padding: EdgeInsets.only(top: 15.w, bottom: 15.w), + onClick: () { + // Navigator.pushNamed(context, Routers.seletGatewayPage); + }), + ), SizedBox( height: 10.h, ), @@ -165,7 +171,7 @@ class _GatewayConfigurationWifiPageState child: Text( TranslationLoader.lanKeys!.noStaticIPIsUsed!.tr, style: TextStyle( - fontSize: 28.sp, color: AppColors.mainColor)), + fontSize: 22.sp, color: AppColors.mainColor)), ), ), onTap: () { @@ -190,7 +196,7 @@ class _GatewayConfigurationWifiPageState Widget getTFWidget(TextEditingController controller, String tfStr) { return SizedBox( height: 50.h, - width: 400.w, + width: 300.w, child: Row( children: [ Expanded( @@ -204,6 +210,7 @@ class _GatewayConfigurationWifiPageState //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle(fontSize: 22.sp), //不需要输入框下划线 border: InputBorder.none, ), diff --git a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart index 6bac3f95..b34709f0 100644 --- a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart +++ b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart @@ -38,17 +38,26 @@ class _GatewayListPageState extends State { ), ], ), - body: ListView.builder( - itemCount: 10, - itemBuilder: (c, index) { - return _gatewatListItem( - 'images/mine/icon_mine_gatewayListMainIcon.png', - "星锁网关", - "在线", - "2", () { - Navigator.pushNamed(context, Routers.gatewayDetailPage); - }); - }), + body: ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _gatewatListItem( + 'images/mine/icon_mine_gatewayListMainIcon.png', + "星锁网关", + "在线", + "2", () { + Navigator.pushNamed(context, Routers.gatewayDetailPage); + }); + }, + separatorBuilder: (BuildContext context, int index) { + return Divider( + height: 1, + color: AppColors.greyLineColor, + indent: 20.w, + endIndent: 0, + ); + }, + ), ); } @@ -58,7 +67,7 @@ class _GatewayListPageState extends State { onTap: action, child: Container( // height: 100.h, - margin: const EdgeInsets.only(bottom: 2), + // margin: const EdgeInsets.only(bottom: 2), padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 18.h, bottom: 18.h), decoration: BoxDecoration( diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart index 43151cab..f8a23dd4 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_page.dart @@ -114,23 +114,47 @@ class _MinePersonInfoSetSafetyProblemPageState child: ListView( children: [ ListTile( - title: Text('你第一次乘坐飞机取得是哪个城市?', textAlign: TextAlign.center), + title: Text( + '你第一次乘坐飞机取得是哪个城市?', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 22.sp), + ), onTap: () { Navigator.of(context).pop(true); }, ), + const Divider( + color: AppColors.greyLineColor, + height: 1, + ), ListTile( - title: Text('你的QQ号码是多少', textAlign: TextAlign.center), + title: Text( + '你的QQ号码是多少', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 22.sp), + ), onTap: () { Navigator.of(context).pop(true); }, ), + const Divider( + color: AppColors.greyLineColor, + height: 1, + ), ListTile( - title: Text('你的第一个宠物叫什么名字', textAlign: TextAlign.center), + title: Text( + '你的第一个宠物叫什么名字', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 22.sp), + ), onTap: () { Navigator.of(context).pop(true); }, ), + const Divider( + color: AppColors.greyLineColor, + height: 1, + ), ], ), ); diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart index 39191215..e978c301 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart @@ -265,7 +265,7 @@ class _AddAuthorizedAdministratorPageState leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle: "", isHaveRightWidget: true, - rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()), action: () {}), Container(height: 40.h), ], diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart index 29e895e0..9710bcc6 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart @@ -100,7 +100,7 @@ class _AuthorizedAdministratorListPageState return GestureDetector( onTap: action, child: Container( - height: 90.h, + height: 100.h, margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), decoration: BoxDecoration( color: Colors.white, diff --git a/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart b/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart index 5cc3ddab..cc4d31f5 100644 --- a/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart +++ b/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart @@ -44,7 +44,7 @@ class _LockUserManageListListPageState Expanded(child: _buildMainUI()), SizedBox( width: ScreenUtil().screenWidth - 40.w, - height: 80.h, + height: 90.h, child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Colors.white, diff --git a/star_lock/lib/mine/mineSet/mineSet_page.dart b/star_lock/lib/mine/mineSet/mineSet_page.dart index 6073a4cd..3139cdd5 100644 --- a/star_lock/lib/mine/mineSet/mineSet_page.dart +++ b/star_lock/lib/mine/mineSet/mineSet_page.dart @@ -39,21 +39,21 @@ class _MineSetPageState extends State { isHaveLine: true, isHaveRightWidget: true, rightWidget: SizedBox( - width: 10.w, height: 50.h, child: _switch())), + width: 60.w, height: 50.h, child: _switch())), CommonItem( leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr, rightTitle: "", isHaveLine: true, isHaveRightWidget: true, rightWidget: SizedBox( - width: 10.w, height: 50.h, child: _switch())), + width: 60.w, height: 50.h, child: _switch())), CommonItem( leftTitel: TranslationLoader.lanKeys!.pushNotification!.tr, rightTitle: "", isHaveRightWidget: true, rightWidget: SizedBox( - width: 10.w, height: 50.h, child: _switch())), + width: 60.w, height: 50.h, child: _switch())), SizedBox( height: 10.h, ), diff --git a/star_lock/lib/mine/supportStaff/supportStaff_page.dart b/star_lock/lib/mine/supportStaff/supportStaff_page.dart index d44fe39d..9163fffd 100644 --- a/star_lock/lib/mine/supportStaff/supportStaff_page.dart +++ b/star_lock/lib/mine/supportStaff/supportStaff_page.dart @@ -125,7 +125,7 @@ class _SupportStaffPageState extends State { isHaveLine! ? Container( height: 0.5.h, - color: Colors.grey, + color: AppColors.greyLineColor, ) : Container() ], diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart index ed87defa..e91ec221 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart @@ -102,6 +102,9 @@ class _ValueAddedServicesAddSMSTemplatePageState // Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage); }), ), + SizedBox( + height: 40.h, + ) ], )); } @@ -248,8 +251,8 @@ class _ValueAddedServicesAddSMSTemplatePageState children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 30.w, - height: 30.w, + width: 26.w, + height: 26.w, ), ], ), diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart index b23931be..6359cd44 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart @@ -41,6 +41,9 @@ class _ValueAddedServicesListSMSTemplatePageState Navigator.pushNamed( context, Routers.valueAddedServicesAddSMSTemplatePage); }), + SizedBox( + height: 40.h, + ) ], ), ); diff --git a/star_lock/lib/tools/submitBtn.dart b/star_lock/lib/tools/submitBtn.dart index 201505ab..2dd24868 100644 --- a/star_lock/lib/tools/submitBtn.dart +++ b/star_lock/lib/tools/submitBtn.dart @@ -31,21 +31,20 @@ class SubmitBtn extends StatelessWidget { bool? isDelete; bool? isDisabled; - SubmitBtn( - {Key? key, - required this.btnName, - this.borderRadius, - this.color, - this.padding, - this.onClick, - this.margin, - this.width, - this.backgroundColorList, - this.isDelete, - this.fontSize, - this.isDisabled, - }) - : super(key: key); + SubmitBtn({ + Key? key, + required this.btnName, + this.borderRadius, + this.color, + this.padding, + this.onClick, + this.margin, + this.width, + this.backgroundColorList, + this.isDelete, + this.fontSize, + this.isDisabled, + }) : super(key: key); @override Widget build(BuildContext context) { @@ -54,7 +53,9 @@ class SubmitBtn extends StatelessWidget { height: 60.h, child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: isDisabled == false ? Colors.grey : (isDelete == true ? Colors.red : AppColors.mainColor), + backgroundColor: isDisabled == false + ? Colors.grey + : (isDelete == true ? Colors.red : AppColors.mainColor), ), onPressed: () { if (onClick != null) { @@ -105,3 +106,57 @@ class SubmitBtn extends StatelessWidget { */ } } + +/* +* 底部添加白色按钮 公用组件 +* */ + +class AddBottomWhiteBtn extends StatelessWidget { + String? btnName; + + Function()? onClick; + + AddBottomWhiteBtn({ + Key? key, + required this.btnName, + this.onClick, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + child: Container( + height: 90.h, + margin: EdgeInsets.only(left: 20.w, right: 20.w), + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(8.w)), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'images/icon_btn_add.png', + width: 28.w, + height: 28.w, + ), + SizedBox( + width: 6.w, + ), + Text( + btnName!, + style: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.bold), + ) + ], + ), + ), + onTap: () { + if (onClick != null) { + onClick!(); + } + }, + ); + } +}