diff --git a/star_lock/images/icon_bar_tips.png b/star_lock/images/icon_bar_tips.png new file mode 100644 index 00000000..88ae4060 Binary files /dev/null and b/star_lock/images/icon_bar_tips.png differ diff --git a/star_lock/images/icon_card.png b/star_lock/images/icon_card.png new file mode 100644 index 00000000..355b5c01 Binary files /dev/null and b/star_lock/images/icon_card.png differ diff --git a/star_lock/images/icon_electronicKey_admin.png b/star_lock/images/icon_electronicKey_admin.png new file mode 100644 index 00000000..d2a83cfd Binary files /dev/null and b/star_lock/images/icon_electronicKey_admin.png differ diff --git a/star_lock/images/icon_send_success.png b/star_lock/images/icon_send_success.png new file mode 100644 index 00000000..048f23c2 Binary files /dev/null and b/star_lock/images/icon_send_success.png differ diff --git a/star_lock/images/icon_tips_Q.png b/star_lock/images/icon_tips_Q.png new file mode 100644 index 00000000..094f5f9d Binary files /dev/null and b/star_lock/images/icon_tips_Q.png differ diff --git a/star_lock/images/lan/lan_en.json b/star_lock/images/lan/lan_en.json index c015147b..c47d5b02 100644 --- a/star_lock/images/lan/lan_en.json +++ b/star_lock/images/lan/lan_en.json @@ -137,6 +137,8 @@ "electricQuantity":"Electric Quantity", "lockName":"Lock Name", "lockGrouping":"Lock Grouping", + "selectGroup":"Selective grouping", + "createNewGroup":"Create a new group", "adminOpenLockPassword":"Admin Open Lock Password", "update":"Update", "updateElectricQuantityTip":"The battery information can be updated remotely via the gateway or next to the lock via Bluetooth on the phone\n", @@ -170,7 +172,8 @@ "high":"High", "higher":"Higher", "burglarAlarmTip":"After opening, an alarm sound will be issued when the lock is picked", - "resetButtonTip":"After opening, you can re-add with APP by long pressing the reset key on the lock. After closing, the reset key is invalid, and the lock can be re-added only after being deleted by app", + "resetButtonTip1":"After opening, you can re-add with APP by long pressing the reset key on the lock.", + "resetButtonTip2":"After closing, the reset key is invalid, and the lock can be re-added only after being deleted by app", "calibrationTime":"Calibration Time", "setTheDSTMode":"Set The DST Mode", "diagnoseTip":"Diagnosis is to read the configuration information inside the lock and upload it so that the staff can analyze the cause of the failure", @@ -201,6 +204,7 @@ "pushNotification":"Push Notification", "lockUserManagement":"Lock User Management", "aboutToExpire":"About to expire", + "changeName":"Change name", "authorizedAdmin":"Authorized Admin", "addAuthorizedAdmin":"Adding an Authorized Administrator", "lockGroup":"Lock Group", diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 6199a990..818c2ca6 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -137,6 +137,8 @@ "electricQuantity":"electricQuantity", "lockName":"lockName", "lockGrouping":"lockGrouping", + "selectGroup":"selectGroup", + "createNewGroup":"createNewGroup", "adminOpenLockPassword":"adminOpenLockPassword", "update":"update", "updateElectricQuantityTip":"updateElectricQuantityTip", @@ -170,7 +172,8 @@ "high":"high", "higher":"higher", "burglarAlarmTip":"burglarAlarmTip", - "resetButtonTip":"resetButtonTip", + "resetButtonTip1":"resetButtonTip1", + "resetButtonTip2":"resetButtonTip2", "calibrationTime":"calibrationTime", "setTheDSTMode":"setTheDSTMode", "diagnoseTip":"diagnoseTip", @@ -243,6 +246,7 @@ "problemThree":"problemThree", "pleaseEnterYourAnswer":"pleaseEnterYourAnswer", "aboutToExpire":"aboutToExpire", + "changeName":"changeName", "designation": "designation", "state": "state", diff --git a/star_lock/images/lan/lan_zh.json b/star_lock/images/lan/lan_zh.json index 7d913bc3..6b050357 100644 --- a/star_lock/images/lan/lan_zh.json +++ b/star_lock/images/lan/lan_zh.json @@ -137,6 +137,8 @@ "electricQuantity":"电量", "lockName":"名称", "lockGrouping":"锁分组", + "selectGroup":"选择分组", + "createNewGroup":"创建新分组", "adminOpenLockPassword":"管理员开锁密码", "update":"更新", "updateElectricQuantityTip":"电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新", @@ -170,7 +172,8 @@ "higher":"较高", "high":"高", "burglarAlarmTip":"开启后,锁被撬动时,会发出报警声", - "resetButtonTip":"开启后,可通过长按锁上的重置键来用APP重新添加\\n关闭后,重置键无效,锁要通过app删除后才能重新添加", + "resetButtonTip1":"开启后,可通过长按锁上的重置键来用APP重新添加", + "resetButtonTip2":"关闭后,重置键无效,锁要通过app删除后才能重新添加", "calibrationTime":"校准时间", "setTheDSTMode":"夏令时模式设置", "diagnoseTip":"诊断是读取锁内的配置信息并上传,以便工作人员分析故障的原因", @@ -243,6 +246,7 @@ "problemThree":"问题三", "pleaseEnterYourAnswer":"请输入你的答案", "aboutToExpire":"即将到期", + "changeName":"修改名称", "designation": "名称", "state": "状态", diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index 8494412b..e9663052 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -1,7 +1,7 @@ -import 'package:flutter/material.dart'; import 'package:get/get.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/lockUserManage/ownedKeyList_page.dart'; import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart'; import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList_page.dart'; import 'package:star_lock/mine/mineSet/mineSet_page.dart'; @@ -259,6 +259,7 @@ abstract class Routers { static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关 static const addAuthorizedAdministratorPage = '/addAuthorizedAdministratorPage'; //添加授权管理员 + static const ownedKeyListPage = '/ownedKeyListPage'; //拥有的钥匙 static const starLockLoginPage = '/StarLockLoginPage'; // 登录 static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册 @@ -687,6 +688,8 @@ abstract class AppRouters { page: () => const MinePersonInfoEditEmailPage()), GetPage( name: Routers.addAuthorizedAdministratorPage, - page: () => const AddAuthorizedAdministratorPage()) + page: () => const AddAuthorizedAdministratorPage()), + GetPage( + name: Routers.ownedKeyListPage, page: () => const OwnedKeyListPage()) ]; } diff --git a/star_lock/lib/app_settings/app_colors.dart b/star_lock/lib/app_settings/app_colors.dart index da75713e..8131ca39 100644 --- a/star_lock/lib/app_settings/app_colors.dart +++ b/star_lock/lib/app_settings/app_colors.dart @@ -120,4 +120,5 @@ class AppColors { static const placeholderTextColor = Color.fromRGBO(128, 128, 128, 1); //占位字体颜色 static const greyBackgroundColor = Color.fromRGBO(240, 240, 240, 1); //灰色背景色 static const btnDisableColor = Color.fromRGBO(178, 178, 178, 1); //按钮不可用灰色 + static const toBeReceiveBgColor = Color.fromRGBO(246, 203, 203, 1); //待接收红色背景 } diff --git a/star_lock/lib/baseWidget.dart b/star_lock/lib/baseWidget.dart index d5234263..4315f18e 100644 --- a/star_lock/lib/baseWidget.dart +++ b/star_lock/lib/baseWidget.dart @@ -1,24 +1,23 @@ - - 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'; -mixin BaseWidget{ +mixin BaseWidget { double fs(double value) => value.sp; double w(double width) => width.w; double h(double height) => height.h; initUI(Widget widget) => ScreenUtilInit( - // designSize: const Size(750, 1334), - designSize: const Size(375, 812), - minTextAdapt: true, - splitScreenMode: true, - builder: (context , child) { - return widget; - }, - ); + // designSize: const Size(750, 1334), + designSize: const Size(375, 812), + minTextAdapt: true, + splitScreenMode: true, + builder: (context, child) { + return widget; + }, + ); ///数据为空的视图 Widget emptyView() { @@ -32,16 +31,17 @@ mixin BaseWidget{ children: [ Image.asset( 'images/icon_unHaveData.png', - height: 200.w, - width: 200.w, + height: 120.w, + width: 120.w, ), Padding( padding: const EdgeInsets.only(top: 10), - child: Text(TranslationLoader.lanKeys!.noData!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600)), + child: Text(TranslationLoader.lanKeys!.noData!.tr, + style: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor)), ) ], ), ); } - -} \ No newline at end of file +} diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart index 5e007536..dcbf7c45 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdminManage/authorizedAdminManage_tabbar.dart @@ -9,18 +9,22 @@ import '../../../electronicKey/sendElectronicKey/sendElectronicKey/sendElectroni import '../authorizedAdmin_page.dart'; class AuthorizedAdminManageTabbar extends StatefulWidget { - var initialIndex=1; + var initialIndex = 1; - AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) : super(key: key); + AuthorizedAdminManageTabbar({Key? key, required this.initialIndex}) + : super(key: key); @override - State createState() => _AuthorizedAdminManageTabbarState(); + State createState() => + _AuthorizedAdminManageTabbarState(); } -class _AuthorizedAdminManageTabbarState extends State with SingleTickerProviderStateMixin { +class _AuthorizedAdminManageTabbarState + extends State + with SingleTickerProviderStateMixin { late TabController _tabController; - final List _itemTabs= [ + final List _itemTabs = [ ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"), ]; @@ -29,33 +33,44 @@ class _AuthorizedAdminManageTabbarState extends State _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } @@ -63,19 +78,26 @@ class _AuthorizedAdminManageTabbarState extends State AuthorizedAdminPage(type: item.type,)).toList(), + children: _itemTabs + .map((ItemView item) => AuthorizedAdminPage( + type: item.type, + )) + .toList(), ), ); } 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 3eedc10f..68ea892f 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdmin/authorizedAdmin_page.dart @@ -134,12 +134,17 @@ class _AuthorizedAdminPageState extends State { child: Text( tipStr, textAlign: TextAlign.start, + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 20.sp), )), ], ), ), + SizedBox( + height: 20.h, + ), SubmitBtn( - btnName: TranslationLoader.lanKeys!.sender!.tr, + btnName: TranslationLoader.lanKeys!.send!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), @@ -157,9 +162,8 @@ class _AuthorizedAdminPageState extends State { }, child: Text( TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr, - style: TextStyle( - color: AppColors.mainColor, - fontWeight: FontWeight.w500), + style: + TextStyle(color: AppColors.mainColor, fontSize: 24.sp), )), ], ), @@ -182,10 +186,9 @@ class _AuthorizedAdminPageState extends State { height: 30.h, ), Image.asset( - 'images/main/icon_main_addLock.png', + 'images/icon_send_success.png', width: 150.w, height: 150.w, - color: AppColors.mainColor, ), SizedBox( height: 20.h, @@ -246,7 +249,7 @@ class _AuthorizedAdminPageState extends State { Widget getTFWidget(bool isHaveBtn, String tfStr) { return Container( height: 50.h, - width: 500.w, + width: 300.w, child: Row( children: [ Expanded( @@ -260,6 +263,8 @@ class _AuthorizedAdminPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle( + color: AppColors.placeholderTextColor, fontSize: 22.sp), //不需要输入框下划线 border: InputBorder.none, ), @@ -270,12 +275,12 @@ class _AuthorizedAdminPageState extends State { ), isHaveBtn ? Container( - width: 50.w, - height: 50.w, + width: 30.w, + height: 30.w, decoration: const BoxDecoration( color: Colors.white, image: DecorationImage( - image: AssetImage('images/icon_lock.png'), + image: AssetImage('images/icon_addressBook.png'), fit: BoxFit.fill), ), alignment: Alignment.center, 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 0ac8d08f..42610e94 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_page.dart @@ -25,74 +25,74 @@ class _AuthorizedAdminListPageState extends State { barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack: true, backgroundColor: AppColors.mainColor, - actionsList: [ - TextButton( - child: Text( - TranslationLoader.lanKeys!.reset!.tr, - style: const TextStyle(color: Colors.white), - ), - onPressed: () {}, - ), - ], + // actionsList: [ + // TextButton( + // child: Text( + // TranslationLoader.lanKeys!.reset!.tr, + // style: TextStyle(color: Colors.white, fontSize: 24.sp), + // ), + // onPressed: () {}, + // ), + // ], ), body: Column( children: [ - _searchWidget(), Expanded(child: _buildMainUI()), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.authorizedAdmin!.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.authorizedAdminManagePage); - }), - ], - ), - ); - } - - Widget _searchWidget() { - return Container( - height: 60.h, - margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w), - decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.circular(5)), - child: TextField( - //输入框一行 - maxLines: 1, - // controller: _controller, - autofocus: false, - - decoration: InputDecoration( - //输入里面输入文字内边距设置 - contentPadding: const EdgeInsets.only( - top: 12.0, left: -19.0, right: -15.0, bottom: 8.0), - hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr, - hintStyle: TextStyle(fontSize: 22.sp, height: 3.0), - //不需要输入框下划线 - border: InputBorder.none, - //左边图标设置 - icon: Padding( - padding: EdgeInsets.only( - top: 20.h, bottom: 20.h, right: 20.w, left: 10.w), - child: Image.asset( - 'images/main/icon_main_search.png', - width: 40.w, - height: 40.w, - ), + 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: () { + Navigator.pushNamed(context, Routers.authorizedAdminManagePage); + }, + ), + + // SubmitBtn( + // btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr, + // onClick: () { + // Navigator.pushNamed(context, Routers.authorizedAdminManagePage); + // }), + SizedBox( + height: 64.h, + ) + ], ), ); } Widget _buildMainUI() { return ListView.builder( - itemCount: 10, + itemCount: 5, itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_lock.png', "张三", + return _electronicKeyItem('images/controls_user.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15", () { Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); }); @@ -104,7 +104,7 @@ class _AuthorizedAdminListPageState extends State { return GestureDetector( onTap: action, child: Container( - height: 100.h, + height: 90.h, margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), decoration: BoxDecoration( color: Colors.white, @@ -117,11 +117,11 @@ class _AuthorizedAdminListPageState extends State { ), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -133,8 +133,23 @@ class _AuthorizedAdminListPageState extends State { Text( lockTypeTitle, style: TextStyle( - fontSize: 32.sp, fontWeight: FontWeight.w500), + fontSize: 24.sp, color: AppColors.blackColor), ), + SizedBox( + width: 8.w, + ), + Container( + padding: EdgeInsets.only( + left: 4.w, right: 4.w, top: 2.w, bottom: 2.w), + decoration: BoxDecoration( + color: AppColors.toBeReceiveBgColor, + borderRadius: BorderRadius.circular(5.0), + ), + child: Text( + '待接收', + style: TextStyle(color: Colors.red, fontSize: 16.sp), + ), + ) ], ), SizedBox(height: 5.h), @@ -145,7 +160,8 @@ class _AuthorizedAdminListPageState extends State { Text( "2023.6.21 11.15 永久", style: TextStyle( - fontSize: 28.sp, fontWeight: FontWeight.w500), + fontSize: 18.sp, + color: AppColors.placeholderTextColor), ), ], ), diff --git a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart index c0327ee5..080bde7a 100644 --- a/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart @@ -8,18 +8,22 @@ import '../../../../../translations/trans_lib.dart'; import '../volumeAuthorizationLock_page.dart'; class VolumeAuthorizationLockManageTabbar extends StatefulWidget { - var initialIndex=1; + var initialIndex = 1; - VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) : super(key: key); + VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex}) + : super(key: key); @override - State createState() => _VolumeAuthorizationLockManageTabbarState(); + State createState() => + _VolumeAuthorizationLockManageTabbarState(); } -class _VolumeAuthorizationLockManageTabbarState extends State with SingleTickerProviderStateMixin { +class _VolumeAuthorizationLockManageTabbarState + extends State + with SingleTickerProviderStateMixin { late TabController _tabController; - final List _itemTabs= [ + final List _itemTabs = [ ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"), ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"), ]; @@ -28,33 +32,44 @@ class _VolumeAuthorizationLockManageTabbarState extends State _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } @@ -62,19 +77,26 @@ class _VolumeAuthorizationLockManageTabbarState extends State VolumeAuthorizationLockPage(type: item.type,)).toList(), + children: _itemTabs + .map((ItemView item) => VolumeAuthorizationLockPage( + type: item.type, + )) + .toList(), ), ); } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInAddHolidays/checkingInAddHolidays_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInAddHolidays/checkingInAddHolidays_page.dart index 5d8f8c92..dfc511e8 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInAddHolidays/checkingInAddHolidays_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInAddHolidays/checkingInAddHolidays_page.dart @@ -13,56 +13,92 @@ class CheckingInAddHolidaysPage extends StatefulWidget { const CheckingInAddHolidaysPage({Key? key}) : super(key: key); @override - State createState() => _CheckingInAddHolidaysPageState(); + State createState() => + _CheckingInAddHolidaysPageState(); } class _CheckingInAddHolidaysPageState extends State { - @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.addedHoliday!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.addedHoliday!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget("(${TranslationLoader.lanKeys!.mustFillIn!.tr})")), - CommonItem(leftTitel:TranslationLoader.lanKeys!.startDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async { - await showDialog(context: context, - builder: (context) { - return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ - print("111111$dateTime"); - Navigator.of(context).pop(true); - }); - }); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.endDate!.tr, rightTitle:"(${TranslationLoader.lanKeys!.mustFillIn!.tr})", isHaveLine: true, isHaveDirection: false, action: () async { - await showDialog(context: context, - builder: (context) { - return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ - Navigator.of(context).pop(true); - }); - }); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.coverDate!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: false, action: () async { - await showDialog(context: context, - builder: (context) { - return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ - Navigator.of(context).pop(true); - }); - }); - }), - SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: (){ - - } + CommonItem( + leftTitel: TranslationLoader.lanKeys!.name!.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, + rightWidget: getTFWidget( + "(${TranslationLoader.lanKeys!.mustFillIn!.tr})")), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.startDate!.tr, + rightTitle: "(${TranslationLoader.lanKeys!.mustFillIn!.tr})", + isHaveLine: true, + isHaveDirection: false, + action: () async { + await showDialog( + context: context, + builder: (context) { + return ShowCalendar( + datePickerMode: DatePickerMode.day, + seletAction: (dateTime) { + print("111111$dateTime"); + Navigator.of(context).pop(true); + }); + }); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.endDate!.tr, + rightTitle: "(${TranslationLoader.lanKeys!.mustFillIn!.tr})", + isHaveLine: true, + isHaveDirection: false, + action: () async { + await showDialog( + context: context, + builder: (context) { + return ShowCalendar( + datePickerMode: DatePickerMode.day, + seletAction: (dateTime) { + Navigator.of(context).pop(true); + }); + }); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.coverDate!.tr, + rightTitle: "", + isHaveLine: false, + isHaveDirection: false, + action: () async { + await showDialog( + context: context, + builder: (context) { + return ShowCalendar( + datePickerMode: DatePickerMode.day, + seletAction: (dateTime) { + Navigator.of(context).pop(true); + }); + }); + }), + SizedBox( + height: 50.w, ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), ], ), ); } - Widget getTFWidget(String tfStr){ + Widget getTFWidget(String tfStr) { return Container( height: 50.h, width: 300.w, @@ -75,35 +111,39 @@ class _CheckingInAddHolidaysPageState extends State { maxLines: 1, // controller: _controller, autofocus: false, - textAlign:TextAlign.end, + textAlign: TextAlign.end, decoration: InputDecoration( //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor), //不需要输入框下划线 border: InputBorder.none, ), ), ), - SizedBox(width: 10.w,), ], ), ); } - Widget whetherTheEmployeeHasAKeyWidget(String title, Function action){ + Widget whetherTheEmployeeHasAKeyWidget(String title, Function action) { return GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Row( children: [ - Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,), - SizedBox(width: 5.w,), + Image.asset( + 'images/icon_round_unSelet.png', + width: 40.w, + height: 40.w, + ), + SizedBox( + width: 5.w, + ), Text(title), ], ), ); } - } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index e7a5bac7..5b3f45a7 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -22,20 +21,32 @@ class _CheckingInListPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(haveTitleWidget: true, titleWidget:titleWidget(), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - GestureDetector( - onTap: (){ - Navigator.pushNamed(context, Routers.checkingInSetPage); - }, - child: Image.asset('images/main/icon_lockDetail_checkIn_set.png', width: 50.w, height: 50.w,) - ), - SizedBox(width: 30.w,), - ], + appBar: TitleAppBar( + haveTitleWidget: true, + titleWidget: titleWidget(), + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + GestureDetector( + onTap: () { + Navigator.pushNamed(context, Routers.checkingInSetPage); + }, + child: Image.asset( + 'images/main/icon_lockDetail_checkIn_set.png', + width: 36.w, + height: 36.w, + )), + SizedBox( + width: 30.w, + ), + ], ), body: Column( children: [ topInfo(), - SizedBox(height: 10.h,), + SizedBox( + height: 10.h, + ), middleDayInfo(), Expanded(child: bottomList()) ], @@ -43,25 +54,35 @@ class _CheckingInListPageState extends State { ); } - Widget topInfo(){ + Widget topInfo() { return Container( width: 1.sw, // height: 370.h, color: Colors.white, child: Column( children: [ - SizedBox(height: 30.h,), - Image.asset('images/main/icon_checkInRankingListTop.png', width: 145.w, height: 145.w), - SizedBox(height: 10.h,), - Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500)), - SizedBox(height: 30.h,), + SizedBox( + height: 30.h, + ), + Image.asset('images/main/icon_checkInRankingListTop.png', + width: 120.w, height: 120.w), + SizedBox( + height: 10.h, + ), + Text(TranslationLoader.lanKeys!.noAttendanceRecord!.tr, + style: TextStyle(fontSize: 24.sp)), + SizedBox( + height: 30.h, + ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ // SizedBox(width: 30.w,), Row( children: [ - SizedBox(width: 40.w,), + SizedBox( + width: 40.w, + ), Container( // width: 150.w, height: 70.h, @@ -69,20 +90,29 @@ class _CheckingInListPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text(TranslationLoader.lanKeys!.dailyCharts!.tr, style: TextStyle(color: AppColors.mainColor)), - Container(width: 20.w, height: 2.h, color: AppColors.mainColor) + Text(TranslationLoader.lanKeys!.dailyCharts!.tr, + style: TextStyle( + color: AppColors.mainColor, fontSize: 22.sp)), + Container( + width: 20.w, + height: 2.h, + color: AppColors.mainColor) ], ), ), - SizedBox(width: 40.w,), - Container( + SizedBox( + width: 40.w, + ), + SizedBox( // width: 100.w, height: 70.h, // color: Colors.red, child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr, style: const TextStyle(color: Colors.black)), + Text(TranslationLoader.lanKeys!.monthlyLeaderboard!.tr, + style: TextStyle( + color: Colors.black, fontSize: 22.sp)), Container(width: 20.w, height: 2.h, color: Colors.black) ], ), @@ -91,19 +121,31 @@ class _CheckingInListPageState extends State { ), GestureDetector( onTap: () async { - await showDialog(context: context, - builder: (context) { - return ShowCalendar(datePickerMode: DatePickerMode.day, seletAction: (dateTime){ - Navigator.of(context).pop(true); - }); - }); + await showDialog( + context: context, + builder: (context) { + return ShowCalendar( + datePickerMode: DatePickerMode.day, + seletAction: (dateTime) { + Navigator.of(context).pop(true); + }); + }); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("07-12", style: const TextStyle(color: Colors.black),), - Image.asset('images/icon_grayPullDown.png', width: 50.w, height: 30.w,), - SizedBox(width: 10.w,), + Text( + "07-12", + style: TextStyle(color: Colors.black, fontSize: 22.sp), + ), + Image.asset( + 'images/icon_grayPullDown.png', + width: 50.w, + height: 30.w, + ), + SizedBox( + width: 10.w, + ), ], ), ) @@ -115,56 +157,60 @@ class _CheckingInListPageState extends State { ); } - Widget middleDayInfo(){ + Widget middleDayInfo() { return Visibility( visible: true, child: Container( height: 80.h, color: Colors.white, - margin: EdgeInsets.only(left:15.h, right: 15.h, bottom: 10.h), + margin: EdgeInsets.only(left: 15.h, right: 15.h, bottom: 10.h), child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Container( - // width: 100.w, - // height: 80.h, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SizedBox(height: 5.h,), - const Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys!.beLate!.tr, style: const TextStyle(color: Colors.black)), - SizedBox(height: 5.h,), - ], - ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 5.h, + ), + Text("0", + style: TextStyle(color: Colors.black, fontSize: 20.sp)), + Text(TranslationLoader.lanKeys!.beLate!.tr, + style: TextStyle(color: Colors.black, fontSize: 22.sp)), + SizedBox( + height: 5.h, + ), + ], ), - Container( - // width: 100.w, - // height: 80.h, - // color: Colors.red, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SizedBox(height: 5.h,), - Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys!.leaveEarly!.tr, style: const TextStyle(color: Colors.black)), - SizedBox(height: 5.h,), - ], - ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 5.h, + ), + Text("0", + style: TextStyle(color: Colors.black, fontSize: 20.sp)), + Text(TranslationLoader.lanKeys!.leaveEarly!.tr, + style: TextStyle(color: Colors.black, fontSize: 22.sp)), + SizedBox( + height: 5.h, + ), + ], ), - Container( - // width: 100.w, - // height: 80.h, - // color: Colors.red, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SizedBox(height: 5.h,), - Text("0", style: TextStyle(color: Colors.black)), - Text(TranslationLoader.lanKeys!.noCardPunched!.tr, style: const TextStyle(color: Colors.black)), - SizedBox(height: 5.h,), - ], - ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 5.h, + ), + Text("0", + style: TextStyle(color: Colors.black, fontSize: 20.sp)), + Text(TranslationLoader.lanKeys!.noCardPunched!.tr, + style: TextStyle(color: Colors.black, fontSize: 22.sp)), + SizedBox( + height: 5.h, + ), + ], ), ], ), @@ -172,76 +218,118 @@ class _CheckingInListPageState extends State { ); } - Widget bottomList(){ + Widget bottomList() { return ListView.separated( - itemCount:10, - itemBuilder: (c, index){ - return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){ + itemCount: 10, + itemBuilder: (c, index) { + return _checkingInListItem('images/controls_user.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { Navigator.pushNamed(context, Routers.checkingInDetailPage); }); }, separatorBuilder: (context, index) { - return const Divider(height:1, color: Colors.grey); + return const Divider(height: 1, color: AppColors.greyLineColor); }, ); } - Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ + Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { return GestureDetector( onTap: action, child: Container( height: 80.h, // margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( + decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), ), child: Row( children: [ - SizedBox(width: 30.w,), - Text("1", style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), - SizedBox(width: 20.w,), - Container( - width: 60.h, height: 60.h, - decoration: BoxDecoration( - color: AppColors.mainColor, - border: Border.all(width: 1, color: AppColors.mainColor), - borderRadius: BorderRadius.circular(30.h), - ), - padding: EdgeInsets.all(10.w), - child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 40.w, height: 40.w, color: Colors.white,) + SizedBox( + width: 30.w, + ), + Text( + "1", + style: TextStyle(fontSize: 20.sp), + ), + SizedBox( + width: 20.w, + ), + Image.asset( + 'images/controls_user.png', + width: 40.w, + height: 40.w, + ), + // Container( + // width: 60.h, + // height: 60.h, + // decoration: BoxDecoration( + // color: AppColors.mainColor, + // border: Border.all(width: 1, color: AppColors.mainColor), + // borderRadius: BorderRadius.circular(30.h), + // ), + // padding: EdgeInsets.all(10.w), + // child: Image.asset( + // 'images/controls_user.png', + // width: 30.w, + // height: 30.w, + // color: Colors.white, + // )), + SizedBox( + width: 20.w, ), - SizedBox(width: 20.w,), Expanded( - child: Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + child: Text( + lockTypeTitle, + style: TextStyle(fontSize: 24.sp), + ), ), - SizedBox(width:20.h), - Image.asset("images/icon_right.png", width: 50.w, height: 50.w,), - SizedBox(width:20.h), + SizedBox(width: 20.h), + Image.asset( + "images/icon_right_grey.png", + width: 21.w, + height: 21.w, + ), + SizedBox(width: 20.h), ], ), ), ); } - Widget titleWidget(){ + Widget titleWidget() { return GestureDetector( - onTap: (){ + onTap: () { showListType(); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys!.earlyArrivalList!.tr, style: const TextStyle(color: Colors.white),), - SizedBox(width: 5.w,), - Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) + Text( + TranslationLoader.lanKeys!.earlyArrivalList!.tr, + style: TextStyle(color: Colors.white, fontSize: 26.sp), + ), + SizedBox( + width: 5.w, + ), + Image.asset( + 'images/main/icon_lockDetail_checkIn_topTitle.png', + width: 22.w, + height: 16.w, + fit: BoxFit.fill, + ) ], ), ); } - void showListType(){ - var list = [TranslationLoader.lanKeys!.earlyArrivalList!.tr, TranslationLoader.lanKeys!.lateList!.tr, TranslationLoader.lanKeys!.hardWorkingList!.tr]; + void showListType() { + var list = [ + TranslationLoader.lanKeys!.earlyArrivalList!.tr, + TranslationLoader.lanKeys!.lateList!.tr, + TranslationLoader.lanKeys!.hardWorkingList!.tr + ]; ShowBottomSheetTool().showSingleRowPicker( //上下文 context, @@ -255,10 +343,6 @@ class _CheckingInListPageState extends State { //adapter: PickerAdapter(), data: list, //选择事件的回调 - clickCallBack: (int index, var str) { - - } - ); + clickCallBack: (int index, var str) {}); } - } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart index 4374bd02..00c9668f 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSet/checkingInSet_page.dart @@ -26,14 +26,14 @@ 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: [ CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}", + "${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}", rightTitle: "深圳市志超科技", isHaveLine: true, isHaveDirection: true, @@ -50,7 +50,7 @@ class _CheckingInSetPageState extends State { }), CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}", + "${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}", rightTitle: "9:00 - 18:00", isHaveLine: true, isHaveDirection: true, @@ -59,7 +59,7 @@ class _CheckingInSetPageState extends State { }), CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", + "${TranslationLoader.lanKeys!.workday!.tr}${TranslationLoader.lanKeys!.set!.tr}", rightTitle: "1,2,3,4,5", isHaveLine: true, isHaveDirection: true, @@ -79,7 +79,7 @@ class _CheckingInSetPageState extends State { ), 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, @@ -97,7 +97,7 @@ class _CheckingInSetPageState extends State { builder: (BuildContext context) { return ShowTFView( title: - "${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", + "${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}", tipTitle: "", controller: _changeNameController); }); diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart index dd81a4c3..49becf66 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetAddStaff/checkingInAddStaff_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -22,47 +21,82 @@ class _CheckingInAddStaffPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle:"${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.staff!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.staff!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), - CommonItem(leftTitel:TranslationLoader.lanKeys!.punchingMode!.tr, rightTitle:"APP", isHaveLine: false, isHaveDirection: true, action: (){ - _showSeletClockInType(); - }), - SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Row( - children: [ - whetherTheEmployeeHasAKeyWidget("有", (){ - + CommonItem( + leftTitel: TranslationLoader.lanKeys!.name!.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, + rightWidget: + getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.punchingMode!.tr, + rightTitle: "APP", + isHaveLine: false, + isHaveDirection: true, + action: () { + _showSeletClockInType(); }), - SizedBox(width: 30.w,), - whetherTheEmployeeHasAKeyWidget("无", (){ - - }), - ], - )), + SizedBox( + height: 10.h, + ), + CommonItem( + leftTitel: + TranslationLoader.lanKeys!.whetherTheEmployeeHasAKey!.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, + rightWidget: Row( + children: [ + whetherTheEmployeeHasAKeyWidget("有", () {}), + SizedBox( + width: 30.w, + ), + whetherTheEmployeeHasAKeyWidget("无", () {}), + ], + )), Visibility( - visible:true, - child: CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), + visible: true, + child: CommonItem( + leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, + rightWidget: + getTFWidget(TranslationLoader.lanKeys!.pleaseEnter!.tr)), ), Visibility( - visible:true, - child: CommonItem(leftTitel:TranslationLoader.lanKeys!.selectKey!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ - _showSeletClockInType(); - }), + visible: true, + child: CommonItem( + leftTitel: TranslationLoader.lanKeys!.selectKey!.tr, + rightTitle: "", + isHaveLine: false, + isHaveDirection: true, + action: () { + _showSeletClockInType(); + }), ), - SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: (){ - - } + SizedBox( + height: 50.w, ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), ], ), ); } - Widget getTFWidget(String tfStr){ + Widget getTFWidget(String tfStr) { return Container( height: 50.h, width: 300.w, @@ -75,26 +109,28 @@ class _CheckingInAddStaffPageState extends State { maxLines: 1, // controller: _controller, autofocus: false, - textAlign:TextAlign.end, + textAlign: TextAlign.end, decoration: InputDecoration( //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle(fontSize: 22.sp), //不需要输入框下划线 border: InputBorder.none, ), ), ), - SizedBox(width: 10.w,), ], ), ); } - void _showSeletClockInType(){ - var list = ["15080825640",]; - ShowBottomSheetTool().showSingleRowPicker( - //上下文 + void _showSeletClockInType() { + var list = [ + "15080825640", + ]; + ShowBottomSheetTool().showSingleRowPicker( + //上下文 context, //默认的索引 normalIndex: 0, @@ -106,25 +142,30 @@ class _CheckingInAddStaffPageState extends State { //adapter: PickerAdapter(), data: list, //选择事件的回调 - clickCallBack: (int index, var str) { - - } - ); + clickCallBack: (int index, var str) {}); } - Widget whetherTheEmployeeHasAKeyWidget(String title, Function action){ + Widget whetherTheEmployeeHasAKeyWidget(String title, Function action) { return GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Row( children: [ - Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,), - SizedBox(width: 5.w,), - Text(title), - ], + Image.asset( + 'images/icon_round_unSelet.png', + width: 26.w, + height: 26.w, + ), + SizedBox( + width: 5.w, + ), + Text( + title, + style: TextStyle( + fontSize: 22.sp, + ), + ), + ], ), ); } - } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart index f1b8b4e1..6e752337 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetHolidays/checkingInSetHolidays_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_pickers/pickers.dart'; import 'package:flutter_pickers/style/default_style.dart'; @@ -19,7 +18,8 @@ class CheckingInSetHolidaysPage extends StatefulWidget { const CheckingInSetHolidaysPage({Key? key}) : super(key: key); @override - State createState() => _CheckingInSetHolidaysPageState(); + State createState() => + _CheckingInSetHolidaysPageState(); } class _CheckingInSetHolidaysPageState extends State { @@ -27,46 +27,63 @@ class _CheckingInSetHolidaysPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(haveTitleWidget: true, titleWidget:titleWidget(), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - GestureDetector( - onTap: (){ - Navigator.pushNamed(context, Routers.checkingInAddHolidaysPage); - }, - child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,) - ), - SizedBox(width: 30.w,), - ], + appBar: TitleAppBar( + haveTitleWidget: true, + titleWidget: titleWidget(), + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + GestureDetector( + onTap: () { + Navigator.pushNamed( + context, Routers.checkingInAddHolidaysPage); + }, + child: Image.asset( + 'images/icon_add_white.png', + width: 36.w, + height: 36.w, + )), + SizedBox( + width: 30.w, + ), + ], ), body: ListView.builder( - itemCount:10, - itemBuilder: (c, index){ - return _checkingInListItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){ + itemCount: 10, + itemBuilder: (c, index) { + return _checkingInListItem('images/icon_lock.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); - } - ) - ); + })); } - Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ + Widget _checkingInListItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { return GestureDetector( onTap: action, child: Container( height: 140.h, margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( + decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), ), child: Row( children: [ Container( - color: const Color(0xFFAFB5D7), + color: const Color(0xFFAFB5D7), width: 100.w, height: 140.h, - child: Center(child: Text("7\n${TranslationLoader.lanKeys!.month!.tr}", textAlign: TextAlign.center, style: TextStyle(fontSize: 32.sp, color: Colors.white),)) + child: Center( + child: Text( + "7\n${TranslationLoader.lanKeys!.month!.tr}", + textAlign: TextAlign.center, + style: TextStyle(fontSize: 28.sp, color: Colors.white), + ))), + SizedBox( + width: 20.w, ), - SizedBox(width: 30.w,), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -76,55 +93,73 @@ class _CheckingInSetHolidaysPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600), ), + Text( + lockTypeTitle, + style: TextStyle(fontSize: 24.sp), + ), ], ), ), - SizedBox(height:10.h), + SizedBox(height: 10.h), Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), + Text( + "${TranslationLoader.lanKeys!.libertyDay!.tr}:2023.6.21 11.15-2023.6.21 11.15", + style: TextStyle(fontSize: 20.sp), + ), ], ), ), - SizedBox(height:5.h), + SizedBox(height: 5.h), Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), + Text( + "${TranslationLoader.lanKeys!.coverDate!.tr}:2023.6.21 11.15", + style: TextStyle(fontSize: 20.sp), + ), ], ), ), ], ), ), - SizedBox(width:20.h), + SizedBox(width: 20.h), ], ), ), ); } - Widget titleWidget(){ + Widget titleWidget() { return GestureDetector( - onTap: (){ + onTap: () { showListType(); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}", style: const TextStyle(color: Colors.white),), - SizedBox(width: 5.w,), - Image.asset('images/main/icon_lockDetail_checkIn_topTitle.png', width: 30.w, height: 16.w,) + Text( + "${DateTime.now().year}${TranslationLoader.lanKeys!.year!.tr}", + style: TextStyle(color: Colors.white, fontSize: 26.sp), + ), + SizedBox( + width: 5.w, + ), + Image.asset( + 'images/main/icon_lockDetail_checkIn_topTitle.png', + width: 22.w, + height: 16.w, + ) ], ), ); } - void showListType(){ + void showListType() { Pickers.showDatePicker( context, // 模式,详见下方 @@ -133,20 +168,17 @@ class _CheckingInSetHolidaysPageState extends State { suffix: Suffix(years: ' 年'), // 样式 详见下方样式 pickerStyle: PickerStyle( - cancelButton:GestureDetector( - onTap: (){ - - }, + cancelButton: GestureDetector( + onTap: () {}, child: Container( alignment: Alignment.center, padding: const EdgeInsets.only(left: 22, right: 12), - child: Text(TranslationLoader.lanKeys!.cancel!.tr, style: const TextStyle(color: Colors.black, fontSize: 16.0)), + child: Text(TranslationLoader.lanKeys!.cancel!.tr, + style: const TextStyle(color: Colors.black, fontSize: 16.0)), ), ), commitButton: GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Container( alignment: Alignment.center, padding: const EdgeInsets.only(left: 22, right: 12), @@ -183,5 +215,4 @@ class _CheckingInSetHolidaysPageState extends State { // } // ); } - } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart index 2120c6a0..44e842f2 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetStaffManage/checkingInStaffManage_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -12,67 +11,99 @@ class CheckingInStaffManagePage extends StatefulWidget { const CheckingInStaffManagePage({Key? key}) : super(key: key); @override - State createState() => _CheckingInStaffManagePageState(); + State createState() => + _CheckingInStaffManagePageState(); } class _CheckingInStaffManagePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.staff!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - GestureDetector( - onTap: (){ - Navigator.pushNamed(context, Routers.checkingInAddStaffPage); - }, - child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,) + backgroundColor: AppColors.greyBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.staff!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + GestureDetector( + onTap: () { + Navigator.pushNamed(context, Routers.checkingInAddStaffPage); + }, + child: Image.asset( + 'images/icon_add_white.png', + width: 36.w, + height: 36.w, + )), + SizedBox( + width: 30.w, + ), + ], ), - SizedBox(width: 30.w,), - ], - ), - body: ListView.separated( - itemCount:10, - itemBuilder: (c, index){ - return _checkingInStaffManageItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){ - // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); - }); - }, - separatorBuilder: (context, index) { - return const Divider(height:1, indent: 20, color: Colors.grey); - }, - ) - ); + body: Container( + color: Colors.white, + child: ListView.separated( + itemCount: 10, + itemBuilder: (c, index) { + return _checkingInStaffManageItem('images/icon_lock.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { + // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); + }); + }, + separatorBuilder: (context, index) { + return const Divider( + height: 1, indent: 20, color: AppColors.greyLineColor); + }, + ), + )); } - Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ + Widget _checkingInStaffManageItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { return GestureDetector( onTap: action, child: Container( - height: 70.h, - margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.h, bottom: 10.h), + height: 60.h, + margin: + EdgeInsets.only(left: 10.w, right: 10.w, top: 10.h, bottom: 10.h), // decoration: BoxDecoration( // color: Colors.white, - // borderRadius: BorderRadius.circular(10.w), + // borderRadius: BorderRadius.circular(10.w), // ), child: Row( children: [ - SizedBox(width: 30.w,), - Container( - width: 60.h, height: 60.h, - decoration: BoxDecoration( - color: AppColors.mainColor, - border: Border.all(width: 1, color: AppColors.mainColor), - borderRadius: BorderRadius.circular(30.h), - ), - padding: EdgeInsets.all(10.w), - child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 40.w, height: 40.w, color: Colors.white,) + SizedBox( + width: 30.w, + ), + Image.asset( + 'images/controls_user.png', + width: 40.w, + height: 40.w, + ), + // Container( + // width: 60.h, + // height: 60.h, + // decoration: BoxDecoration( + // color: AppColors.mainColor, + // border: Border.all(width: 1, color: AppColors.mainColor), + // borderRadius: BorderRadius.circular(30.h), + // ), + // padding: EdgeInsets.all(10.w), + // child: Image.asset( + // 'images/controls_user.png', + // width: 40.w, + // height: 40.w, + // color: Colors.white, + // )), + SizedBox( + width: 30.w, + ), + Text( + lockTypeTitle, + style: TextStyle(fontSize: 24.sp), ), - SizedBox(width: 30.w,), - Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), ], ), ), ); } - } diff --git a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart index 5419696d..9b39d497 100644 --- a/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart +++ b/star_lock/lib/main/lockDetail/checkingIn/checkingInSetWorkdaySet/checkingInSetWorkdaySet_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -13,70 +12,77 @@ class CheckingInSetWorkdaySet extends StatefulWidget { const CheckingInSetWorkdaySet({Key? key}) : super(key: key); @override - State createState() => _CheckingInSetWorkdaySetState(); + State createState() => + _CheckingInSetWorkdaySetState(); } class _CheckingInSetWorkdaySetState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), - body: ListView( - children: [ - topBtnWidget(), - Visibility( - visible:false, - child: bottomCustomSeletBtn() - ), - Visibility( - visible:true, - child: bottomOddOrEvenDaysOffSeletBtn() - ), - SizedBox(height: 50.h,), - SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.tr, - borderRadius: 20.w, - fontSize: 32.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), - ], - ),); + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), + body: ListView( + children: [ + topBtnWidget(), + Visibility(visible: true, child: bottomCustomSeletBtn()), + Visibility(visible: false, child: bottomOddOrEvenDaysOffSeletBtn()), + SizedBox( + height: 50.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}), + ), + ], + ), + ); } - Widget topBtnWidget(){ + Widget topBtnWidget() { return Container( width: 1.sw, - height: 120.h, + height: 100.h, // color: Colors.red, padding: EdgeInsets.all(10.w), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - width: (1.sw - 5.w*2)/2, - height: 120.h, + width: (1.sw - 5.w * 2) / 2, + height: 100.h, color: AppColors.mainColor, child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white))), + Center( + child: Text(TranslationLoader.lanKeys!.custom!.tr, + style: + TextStyle(fontSize: 26.sp, color: Colors.white))), ], ), ), // SizedBox(width: 10.w,), Container( - width: (1.sw - 10*3)/2, - height: 120.h, - color: Colors.grey, + width: (1.sw - 10 * 3) / 2, + height: 100.h, + color: AppColors.btnDisableColor, padding: EdgeInsets.all(10.w), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded(child: Center(child: Text(TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white), textAlign: TextAlign.center,))), + Expanded( + child: Center( + child: Text( + TranslationLoader.lanKeys!.oddOrEvenDaysOff!.tr, + style: TextStyle(fontSize: 26.sp, color: Colors.white), + textAlign: TextAlign.center, + ))), ], ), ), @@ -85,86 +91,188 @@ class _CheckingInSetWorkdaySetState extends State { ); } - Widget bottomOddOrEvenDaysOffSeletBtn(){ + Widget bottomOddOrEvenDaysOffSeletBtn() { return Container( - padding: EdgeInsets.only(left:10.w, right: 10.w), + padding: EdgeInsets.only(left: 10.w, right: 10.w), child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.thisWeek!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true), - CommonItem(leftTitel:TranslationLoader.lanKeys!.singleDayWeekend!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem( + leftTitel: TranslationLoader.lanKeys!.thisWeek!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.singleDayWeekend!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.twoDaysOff!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.twoDaysOff!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: false, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), ], ), ); } - Widget bottomCustomSeletBtn(){ + Widget bottomCustomSeletBtn() { return Container( - padding: EdgeInsets.only(left:10.w, right: 10.w), + padding: EdgeInsets.only(left: 10.w, right: 10.w), child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.monday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + CommonItem( + leftTitel: TranslationLoader.lanKeys!.monday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.tuesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.tuesday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.wednesday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.wednesday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.thursday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.thursday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.friday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.friday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.saturday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: true, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.saturday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.sunday!.tr, rightTitle:"", allHeight:70.h, isHaveLine: false, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.sunday!.tr, + rightTitle: "", + allHeight: 60.h, + isHaveLine: false, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), ], ), ); 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 131c477e..f6be6213 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyList/electronicKeyList_page.dart @@ -28,7 +28,7 @@ class _ElectronicKeyListPageState extends State { TextButton( child: Text( TranslationLoader.lanKeys!.reset!.tr, - style: const TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () {}, ), @@ -37,17 +37,46 @@ class _ElectronicKeyListPageState extends State { body: Column( children: [ _searchWidget(), + SizedBox( + height: 20.h, + ), Expanded(child: _buildMainUI()), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.sendKey!.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.sendElectronicKeyManagePage); - }), + 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: () { + Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage); + }, + ), + SizedBox( + height: 64.h, + ) ], ), ); @@ -89,14 +118,21 @@ class _ElectronicKeyListPageState extends State { } Widget _buildMainUI() { - return ListView.builder( - itemCount: 10, - itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_lock.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.electronicKeyDetailPage); - }); + return ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem('images/controls_user.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { + Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); } Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, @@ -104,12 +140,8 @@ class _ElectronicKeyListPageState extends State { return GestureDetector( onTap: action, child: Container( - height: 100.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10.w), - ), + color: Colors.white, + height: 90.h, child: Row( children: [ SizedBox( @@ -117,36 +149,41 @@ class _ElectronicKeyListPageState extends State { ), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - // color: Colors.red, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - lockTypeTitle, - style: TextStyle( - fontSize: 32.sp, fontWeight: FontWeight.w500), - ), - SizedBox(width: 20.w), - Text( - "待接收", - style: TextStyle( - fontSize: 24.sp, fontWeight: FontWeight.w500), - ), - ], - ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 24.sp, color: AppColors.blackColor), + ), + SizedBox(width: 10.w), + Image.asset( + 'images/icon_electronicKey_admin.png', + width: 24.w, + height: 20.w, + ), + Expanded( + child: SizedBox( + width: 20.w, + )), + Text( + "待接收", + style: TextStyle(fontSize: 18.sp, color: Colors.red), + ), + ], ), - SizedBox(width: 20.w), + SizedBox(height: 10.h), Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, @@ -154,7 +191,8 @@ class _ElectronicKeyListPageState extends State { Text( "2023.6.21 11.15-2023.6.21 11.15", style: TextStyle( - fontSize: 28.sp, fontWeight: FontWeight.w500), + fontSize: 18.sp, + color: AppColors.placeholderTextColor), ), ], ), 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 10b7e935..e8b47813 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 @@ -41,27 +41,37 @@ class _SendElectronicKeyPageState extends State { // 限时 return sendElectronicKeySucceed(); // return Column( - // children: [ - // keyInfoWidget(), - // keyTimeWidget(), - // keyRealNameWidget(), - // keyBottomWidget() - // ], - // ); + // children: [ + // keyInfoWidget(), + // keyTimeWidget(), + // remoteUnlockingWidget(), + // keyRealNameWidget(), + // keyBottomWidget() + // ], + // ); } - break; case 1: { // 永久 return Column( - children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()], + children: [ + keyInfoWidget(), + remoteUnlockingWidget(), + keyRealNameWidget(), + keyBottomWidget() + ], ); } case 2: { // 单次 return Column( - children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()], + children: [ + keyInfoWidget(), + remoteUnlockingWidget(), + keyRealNameWidget(), + keyBottomWidget() + ], ); } case 3: @@ -70,8 +80,9 @@ class _SendElectronicKeyPageState extends State { return Column( children: [ keyInfoWidget(), - keyRealNameWidget(), keyPeriodValidityWidget(), + remoteUnlockingWidget(), + keyRealNameWidget(), keyBottomWidget() ], ); @@ -135,10 +146,10 @@ class _SendElectronicKeyPageState extends State { CommonItem( leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle: "", + isTipsImg: true, isHaveRightWidget: true, - rightWidget: Container(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), action: () {}), - Container(height: 10.h), ], ); } @@ -155,6 +166,9 @@ class _SendElectronicKeyPageState extends State { Navigator.pushNamed( context, Routers.electronicKeyPeriodValidityPage); }), + SizedBox( + height: 10.h, + ) ], ); } @@ -171,6 +185,8 @@ class _SendElectronicKeyPageState extends State { child: Text( TranslationLoader.lanKeys!.sendKeyBottomTip!.tr, textAlign: TextAlign.start, + style: TextStyle( + fontSize: 18.sp, color: AppColors.darkGrayTextColor), )), ], ), @@ -189,9 +205,8 @@ class _SendElectronicKeyPageState extends State { }, child: Text( TranslationLoader.lanKeys!.sendGroupKey!.tr, - style: TextStyle( - color: AppColors.mainColor, - fontWeight: FontWeight.w500), + style: + TextStyle(color: AppColors.mainColor, fontSize: 22.sp), )), ], ), @@ -214,10 +229,9 @@ class _SendElectronicKeyPageState extends State { height: 30.h, ), Image.asset( - 'images/main/icon_main_addLock.png', - width: 150.w, - height: 150.w, - color: AppColors.mainColor, + 'images/icon_send_success.png', + width: 100.w, + height: 100.w, ), SizedBox( height: 20.h, @@ -228,7 +242,7 @@ class _SendElectronicKeyPageState extends State { Text( "发送成功", style: TextStyle( - fontSize: 32.sp, + fontSize: 26.sp, color: Colors.black, fontWeight: FontWeight.w500), ), @@ -240,36 +254,23 @@ class _SendElectronicKeyPageState extends State { SizedBox( height: 20.h, ), - SubmitBtn( - btnName: '完成', - fontSize: 28.sp, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: () {}), + SubmitBtn(btnName: '完成', onClick: () {}), + SizedBox( + height: 10.h, + ), SubmitBtn( btnName: '邮件通知', - fontSize: 28.sp, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: () { Navigator.pushNamed(context, Routers.sendEmailNotificationPage); }), - SubmitBtn( - btnName: '微信通知', - fontSize: 28.sp, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: () {}), - SubmitBtn( - btnName: '标记为已入住', - fontSize: 28.sp, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: () {}), + SizedBox( + height: 10.h, + ), + SubmitBtn(btnName: '微信通知', onClick: () {}), + SizedBox( + height: 10.h, + ), + SubmitBtn(btnName: '标记为已入住', onClick: () {}), ], ); } @@ -278,7 +279,7 @@ class _SendElectronicKeyPageState extends State { Widget getTFWidget(bool isHaveBtn, String tfStr) { return Container( height: 50.h, - width: 500.w, + width: 320.w, child: Row( children: [ Expanded( @@ -292,6 +293,7 @@ class _SendElectronicKeyPageState extends State { //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle(fontSize: 22.sp), //不需要输入框下划线 border: InputBorder.none, ), @@ -302,12 +304,12 @@ class _SendElectronicKeyPageState extends State { ), isHaveBtn ? Container( - width: 50.w, - height: 50.w, + width: 32.w, + height: 32.w, decoration: const BoxDecoration( color: Colors.white, image: DecorationImage( - image: AssetImage('images/icon_lock.png'), + image: AssetImage('images/icon_addressBook.png'), fit: BoxFit.fill), ), alignment: Alignment.center, @@ -327,6 +329,21 @@ class _SendElectronicKeyPageState extends State { ); } + // 远程开锁 + Widget remoteUnlockingWidget() { + return Column( + children: [ + CommonItem( + leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, + rightTitle: "", + isHaveRightWidget: true, + rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()), + action: () {}), + Container(height: 10.h), + ], + ); + } + CupertinoSwitch _switch() { bool _isOn = false; return CupertinoSwitch( diff --git a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart index 4d0282b1..824b731a 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicManageKey/sendElectronicKeyManage_tabbar.dart @@ -8,15 +8,19 @@ import '../../../../../translations/trans_lib.dart'; import '../sendElectronicKey/sendElectronicKey_page.dart'; class SendElectronicKeyManageTabbar extends StatefulWidget { - var initialIndex=1; + var initialIndex = 1; - SendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key); + SendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) + : super(key: key); @override - State createState() => _SendElectronicKeyManageTabbarState(); + State createState() => + _SendElectronicKeyManageTabbarState(); } -class _SendElectronicKeyManageTabbarState extends State with SingleTickerProviderStateMixin { +class _SendElectronicKeyManageTabbarState + extends State + with SingleTickerProviderStateMixin { late TabController _tabController; final List _itemTabs = [ @@ -30,33 +34,44 @@ class _SendElectronicKeyManageTabbarState extends State _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } @@ -64,19 +79,26 @@ class _SendElectronicKeyManageTabbarState extends State SendElectronicKeyPage(type: item.type,)).toList(), + children: _itemTabs + .map((ItemView item) => SendElectronicKeyPage( + type: item.type, + )) + .toList(), ), ); } 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 e84abc8f..ce1ac181 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/sendEmailNotification/sendEmailNotification_page.dart @@ -10,7 +10,8 @@ class SendEmailNotificationPage extends StatefulWidget { const SendEmailNotificationPage({Key? key}) : super(key: key); @override - State createState() => _SendEmailNotificationPageState(); + State createState() => + _SendEmailNotificationPageState(); } class _SendEmailNotificationPageState extends State { @@ -18,46 +19,71 @@ class _SendEmailNotificationPageState extends State { @override Widget build(BuildContext context) { - _emailController.text = "请爱的用户 \n\n你收到电子钥匙,请试用APP(www.baidu.com)或小程序开锁 \n\n星锁"; + _emailController.text = + "请爱的用户 \n\n你收到电子钥匙,请试用APP(www.baidu.com)或小程序开锁 \n\n星锁"; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "邮件通知", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: "邮件通知", + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ - CommonItem(leftTitel:"接收者", rightTitle:"786612630@qq.com", isHaveLine: true,), - CommonItem(leftTitel:"类型", rightTitle:"个人邮件", isHaveDirection: true,), + CommonItem( + leftTitel: "接收者", + rightTitle: "786612630@qq.com", + isHaveLine: true, + ), + CommonItem( + leftTitel: "类型", + rightTitle: "个人邮件", + isHaveDirection: true, + ), Container(height: 10.h), - CommonItem(leftTitel:"模板", rightTitle:"默认模板", isHaveDirection: true, isHaveLine:true), + CommonItem( + leftTitel: "模板", + rightTitle: "默认模板", + isHaveDirection: true, + isHaveLine: true), Container( height: 360.h, color: Colors.white, - padding: EdgeInsets.only(left:20.w, right: 20.w, top: 20.h, bottom: 20.h), - child:TextField( - maxLines:8, - maxLength:1000, + padding: EdgeInsets.only( + left: 20.w, right: 20.w, top: 20.h, bottom: 20.h), + child: TextField( + maxLines: 8, + maxLength: 1000, textAlign: TextAlign.start, controller: _emailController, - style: TextStyle(color: Colors.black,fontSize: 28.sp,), + style: TextStyle( + color: Colors.black, + fontSize: 28.sp, + ), decoration: InputDecoration( border: OutlineInputBorder( ///设置边框四个角的弧度 borderRadius: BorderRadius.all(Radius.circular(20.h)), + ///用来配置边框的样式 borderSide: const BorderSide( ///设置边框的颜色 color: Color(0xffB2B2B2), + ///设置边框的粗细 width: 0.5, ), ), + ///用来配置输入框获取焦点时的颜色 focusedBorder: OutlineInputBorder( ///设置边框四个角的弧度 borderRadius: BorderRadius.all(Radius.circular(20.h)), + ///用来配置边框的样式 borderSide: const BorderSide( ///设置边框的颜色 color: Color(0xffB2B2B2), + ///设置边框的粗细 width: 1, ), @@ -66,9 +92,13 @@ class _SendEmailNotificationPageState extends State { ), ), Container(height: 40.h), - SubmitBtn(btnName: '发送', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), + SubmitBtn( + btnName: '发送', + fontSize: 28.sp, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), ], ), ); 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 8378e94f..b28de007 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/automaticBlocking/automaticBlocking_page.dart @@ -79,13 +79,16 @@ class _AutomaticBlockingPageState extends State { visible: true, child: Container( color: Colors.white, - padding: EdgeInsets.all(30.w), + padding: EdgeInsets.only( + left: 30.w, top: 10.w, right: 30.w, bottom: 10.w), child: Column( children: [ Row( children: [ Text( - "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"), + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)", + style: TextStyle(fontSize: 24.sp), + ), ], ), TextField( @@ -99,7 +102,7 @@ class _AutomaticBlockingPageState extends State { const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)", - hintStyle: TextStyle(fontSize: 30.sp), + hintStyle: TextStyle(fontSize: 24.sp), //不需要输入框下划线 border: InputBorder.none, ), @@ -118,7 +121,9 @@ class _AutomaticBlockingPageState extends State { children: [ Expanded( child: Text( - TranslationLoader.lanKeys!.automaticBlockingTip!.tr)), + TranslationLoader.lanKeys!.automaticBlockingTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), ) diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart index f02fbe5d..29c1e264 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/adminOpenLockPassword/adminOpenLockPassword_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -12,7 +11,8 @@ class AdminOpenLockPasswordPage extends StatefulWidget { const AdminOpenLockPasswordPage({Key? key}) : super(key: key); @override - State createState() => _AdminOpenLockPasswordPageState(); + State createState() => + _AdminOpenLockPasswordPageState(); } class _AdminOpenLockPasswordPageState extends State { @@ -20,12 +20,18 @@ class _AdminOpenLockPasswordPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Column( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"189934", isHaveLine: false, isHaveDirection: true, action: (){ - - }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.password!.tr, + rightTitle: "189934", + isHaveLine: false, + isHaveDirection: true, + action: () {}), Container( margin: EdgeInsets.all(30.w), child: Column( @@ -33,27 +39,35 @@ class _AdminOpenLockPasswordPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.adminOpenLockPasswordTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), - SizedBox(height:10.h,), + SizedBox( + height: 10.h, + ), GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.updateLockAdminPassword!.tr, style: TextStyle(color: AppColors.mainColor),)), + Expanded( + child: Text( + TranslationLoader + .lanKeys!.updateLockAdminPassword!.tr, + style: TextStyle( + color: AppColors.mainColor, fontSize: 20.sp), + )), ], ), ), ], ), ), - ], - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart index 717ffeb5..4b021d62 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/basicInformation/basicInformation_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -22,34 +21,77 @@ class _BasicInformationPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Column( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Column( children: [ Expanded( child: ListView( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.lockNumber!.tr, rightTitle:"MCBN0c_8f3106", allHeight:70.h, isHaveLine: false), - CommonItem(leftTitel:"MAC/ID", rightTitle:"53:66:9F:06:31:8F/9418481", allHeight:70.h, isHaveLine: false), - SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys!.electricQuantity!.tr, rightTitle:"100%", isHaveLine: true, isHaveDirection: true, action: (){ - Navigator.pushNamed(context, Routers.uploadElectricQuantityPage); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", allHeight:70.h, isHaveLine: false), - SizedBox(height: 10.h,), - CommonItem(leftTitel:TranslationLoader.lanKeys!.lockName!.tr, rightTitle:"MCBN0c_8f3106", isHaveLine: true, isHaveDirection: true, action: (){ - Navigator.pushNamed(context, Routers.editLockNamePage); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.lockGrouping!.tr, rightTitle:"202307", isHaveLine: true, isHaveDirection: true, action: (){ - Navigator.pushNamed(context, Routers.lockSeletGroupingPage); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){ - Navigator.pushNamed(context, Routers.adminOpenLockPasswordPage); - }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.lockNumber!.tr, + rightTitle: "MCBN0c_8f3106", + allHeight: 70.h, + isHaveLine: false), + CommonItem( + leftTitel: "MAC/ID", + rightTitle: "53:66:9F:06:31:8F/9418481", + allHeight: 70.h, + isHaveLine: false), + SizedBox( + height: 10.h, + ), + CommonItem( + leftTitel: + TranslationLoader.lanKeys!.electricQuantity!.tr, + rightTitle: "100%", + isHaveLine: true, + isHaveDirection: true, + action: () { + Navigator.pushNamed( + context, Routers.uploadElectricQuantityPage); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr, + rightTitle: "永久", + allHeight: 70.h, + isHaveLine: false), + SizedBox( + height: 10.h, + ), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.lockName!.tr, + rightTitle: "MCBN0c_8f3106", + isHaveLine: true, + isHaveDirection: true, + action: () { + Navigator.pushNamed(context, Routers.editLockNamePage); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.lockGrouping!.tr, + rightTitle: "202307", + isHaveLine: true, + isHaveDirection: true, + action: () { + Navigator.pushNamed( + context, Routers.lockSeletGroupingPage); + }), + CommonItem( + leftTitel: + TranslationLoader.lanKeys!.adminOpenLockPassword!.tr, + rightTitle: "", + isHaveLine: false, + isHaveDirection: true, + action: () { + Navigator.pushNamed( + context, Routers.adminOpenLockPasswordPage); + }), ], ), ), ], - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart index d670a400..39e7961b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/editLockName/editLockName_page.dart @@ -1,6 +1,6 @@ - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import '../../../../../app_settings/app_colors.dart'; @@ -16,7 +16,8 @@ class EditLockNamePage extends StatefulWidget { } class _EditLockNamePageState extends State { - final TextEditingController _changeLockNameController = TextEditingController(); + final TextEditingController _changeLockNameController = + TextEditingController(); @override void initState() { @@ -28,18 +29,29 @@ class _EditLockNamePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - TextButton( - child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),), - onPressed: (){ - - },), - ],), - body:Container( - child: LoginInput(controller: _changeLockNameController, leftWidget:const SizedBox(), hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ]), - ) - ); + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.changeName!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + TextButton( + child: Text( + TranslationLoader.lanKeys!.sure!.tr, + style: TextStyle(color: Colors.white, fontSize: 24.sp), + ), + onPressed: () {}, + ), + ], + ), + body: Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: LoginInput( + controller: _changeLockNameController, + leftWidget: const SizedBox(), + hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ]), + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart index a581e353..7fa3fe46 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/lockSeletGrouping/lockSeletGrouping_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -21,33 +20,51 @@ class _LockSeletGroupingPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.basicInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Column( - children: [ - Expanded(child: _buildMainUI()), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.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.sendElectronicKeyManagePage); - } - ), - ], - ), + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.selectGroup!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Column( + children: [ + Expanded(child: _buildMainUI()), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.createNewGroup!.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.sendElectronicKeyManagePage); + }), + SizedBox( + height: 40.h, + ) + ], + ), ); } - Widget _buildMainUI(){ + Widget _buildMainUI() { return ListView.builder( - itemCount:2, - itemBuilder: (c, index){ - return CommonItem(leftTitel:"202307", rightTitle:"", allHeight: 70.h, isHaveLine: true, isHaveDirection:false, isHaveRightWidget: true, rightWidget: Image(image: const AssetImage("images/icon_item_checked.png"),width:30.w,height:30.w, fit: BoxFit.contain,), action: (){ - // logic.changeLanguage(e); - }); - } - ); + itemCount: 2, + itemBuilder: (c, index) { + return CommonItem( + leftTitel: "202307", + rightTitle: "", + allHeight: 70.h, + isHaveLine: true, + isHaveDirection: false, + isHaveRightWidget: true, + rightWidget: Image( + image: const AssetImage("images/icon_item_checked.png"), + width: 30.w, + height: 30.w, + fit: BoxFit.contain, + ), + action: () { + // logic.changeLanguage(e); + }); + }); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart index dc316f7c..4290c8a9 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_page.dart @@ -11,45 +11,59 @@ class UploadElectricQuantityPage extends StatefulWidget { const UploadElectricQuantityPage({Key? key}) : super(key: key); @override - State createState() => _UploadElectricQuantityPageState(); + State createState() => + _UploadElectricQuantityPageState(); } -class _UploadElectricQuantityPageState extends State { +class _UploadElectricQuantityPageState + extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.electricQuantity!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.updateElectricQuantityTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 40.h, + ), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%")), + Expanded( + child: Text( + "${TranslationLoader.lanKeys!.electricQuantity!.tr} 100%", + style: TextStyle(fontSize: 20.sp), + )), ], ), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.update!.tr, + SizedBox( + height: 30.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.update!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), + onClick: () {}), ], ), - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart index 144f527c..8b1eee67 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/burglarAlarm/burglarAlarm_page.dart @@ -19,37 +19,50 @@ class _BurglarAlarmPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.burglarAlarm!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.burglarAlarmTip!.tr)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.burglarAlarmTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 20.h, + ), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: const TextStyle(fontWeight: FontWeight.w600),)), + Expanded( + child: Text( + "${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", + style: + TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600), + )), ], ), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, + SizedBox( + height: 40.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.closed!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), + onClick: () {}), ], ), - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart index 14fc1351..d8f102ce 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/diagnose/diagnose_page.dart @@ -19,30 +19,37 @@ class _DiagnosePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.diagnose!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.diagnose!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.diagnoseTip!.tr)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.diagnoseTip!.tr, + style: TextStyle( + fontSize: 20.sp, color: AppColors.darkGrayTextColor), + )), ], ), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.uploading!.tr, + SizedBox( + height: 40.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.uploading!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), + onClick: () {}), ], ), - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart index dde73003..64c5e62b 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/addDoorMagnetic/addDoorMagnetic_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -17,15 +16,20 @@ class AddDoorMagneticPage extends StatefulWidget { } class _AddDoorMagneticPageState extends State { - @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), body: ListView( children: [ - SizedBox(height: 100.h,), + SizedBox( + height: 100.h, + ), Container( // color: Colors.red, margin: EdgeInsets.only(left: 20.w, right: 20.w), @@ -33,41 +37,54 @@ class _AddDoorMagneticPageState extends State { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr, textAlign:TextAlign.center, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)), + Expanded( + child: Text( + TranslationLoader + .lanKeys!.pressAndHoldTheResetButtonTwoSeconds!.tr, + textAlign: TextAlign.center, + style: + TextStyle(fontSize: 24.sp, color: AppColors.blackColor), + )), ], ), ), - SizedBox(height: 90.h,), - Image.asset('images/main/icon_addDoorMagnetic_tip.png', width: 300.w, height: 300.w,), - SizedBox(height: 90.h,), + SizedBox( + height: 90.h, + ), + Image.asset( + 'images/main/icon_addDoorMagnetic_tip.png', + width: 260.w, + height: 260.w, + ), + SizedBox( + height: 90.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), + Text( + TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, + style: TextStyle(fontSize: 22.sp), + ), ], ), - SizedBox(height: 90.h,), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.next!.tr, - borderRadius: 10.w, - fontSize: 28.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), - padding: EdgeInsets.only(top: 15.w, bottom: 15.w), - onClick: (){ - Navigator.pushNamed(context, Routers.nearbyDoorMagneticPage); - } + SizedBox( + height: 90.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.next!.tr, + onClick: () { + Navigator.pushNamed(context, Routers.nearbyDoorMagneticPage); + }), ) ], ), ); } + void onShow() {} - void onShow(){ - - } - - void onHide(){ - - } + void onHide() {} } diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart index 59298736..5ac03168 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/doorMagneticList/doorMagnetic_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -22,7 +21,10 @@ class _DoorMagneticPageState extends State with BaseWidget { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.doorMagnetic!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ Container( @@ -31,26 +33,34 @@ class _DoorMagneticPageState extends State with BaseWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.doorMagneticListTopTip!.tr, + style: + TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w500), + )), ], ), ), Expanded(child: _buildMainUI()), - SubmitBtn( - btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.doorMagnetic!.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.addDoorMagneticPage); - } + Container( + margin: EdgeInsets.only(left: 200.w, right: 200.w), + child: SubmitBtn( + btnName: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.doorMagnetic!.tr}", + onClick: () { + Navigator.pushNamed(context, Routers.addDoorMagneticPage); + }), ), + SizedBox( + height: 500.h, + ) ], ), ); } - Widget _buildMainUI(){ + Widget _buildMainUI() { // return ListView.builder( // itemCount:10, // itemBuilder: (c, index){ @@ -62,21 +72,30 @@ class _DoorMagneticPageState extends State with BaseWidget { return emptyView(); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { return GestureDetector( onTap: action, child: Container( height: 100.h, margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( + decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), ), child: Row( children: [ - SizedBox(width: 30.w,), - Image.asset(lockTypeIcon, width: 50.w, height: 50.w,), - SizedBox(width: 30.w,), + SizedBox( + width: 30.w, + ), + Image.asset( + lockTypeIcon, + width: 50.w, + height: 50.w, + ), + SizedBox( + width: 30.w, + ), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -86,26 +105,34 @@ class _DoorMagneticPageState extends State with BaseWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 32.sp, fontWeight: FontWeight.w500), + ), // SizedBox(width:20.w), // Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), ], ), ), - SizedBox(width:20.w), + SizedBox(width: 20.w), Container( child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + Text( + "2023.6.21 11.15", + style: TextStyle( + fontSize: 28.sp, fontWeight: FontWeight.w500), + ), ], ), ), - SizedBox(width:20.h), + SizedBox(width: 20.h), ], ), ), - SizedBox(width:20.h), + SizedBox(width: 20.h), ], ), ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart index 13e2ef9f..96931fcc 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/doorMagnetic/nearbyDoorMagnetic/nearbyDoorMagnetic_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -19,19 +18,22 @@ class _NearbyDoorMagneticPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: ListView.builder( - itemCount:20, - itemBuilder: (c, index){ - return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){ + itemCount: 20, + itemBuilder: (c, index) { + return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () { // Navigator.pushNamed(context, Routers.saveLockPage); }); - } - ), + }), ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ + Widget nearbyLockItem( + String lockTypeIcon, String lockTypeTitle, Function() action) { return GestureDetector( onTap: action, child: Column( @@ -44,31 +46,41 @@ class _NearbyDoorMagneticPageState extends State { children: [ // SizedBox(width:20.w), // Image.asset(lockTypeIcon, width: 50.w, height: 50.w,), - SizedBox(width:20.w), + SizedBox(width: 20.w), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 24.sp, + ), + ), ], ), ), - SizedBox(width:20.w), - Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,), - SizedBox(width:30.w), + SizedBox(width: 20.w), + Image.asset( + 'images/main/icon_main_addLock.png', + width: 36.w, + height: 36.w, + ), + SizedBox(width: 30.w), ], ), ), - Container(height: 0.5.h, color: Colors.grey,) + Container( + height: 0.5.h, + color: Colors.grey, + ) ], ), ); } - void onShow(){ - } + void onShow() {} - void onHide(){ - } + void onHide() {} } diff --git a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart index 5ecce6f0..7b7afc08 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/importOtherLockData/ImportOtherLockData_page.dart @@ -19,47 +19,57 @@ class _ImportOtherLockDataPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar( - barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, - haveBack: true, - backgroundColor: AppColors.mainColor), - body: Container( - padding: EdgeInsets.all(30.w), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: Text(TranslationLoader - .lanKeys!.importOtherLockDataTip!.tr)), - ], - ), - SizedBox( - height: 20.h, - ), - _searchWidget(), - SizedBox( - height: 10.h, - ), - Expanded(child: _buildMainUI()), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.sure!.tr, - borderRadius: 20.w, - fontSize: 32.sp, - // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () {}), - ], + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + IconButton( + icon: Image.asset( + 'images/icon_bar_tips.png', + width: 32.w, + height: 32.w, + ), + onPressed: () {}, ), - )); + ], + ), + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 30.w, left: 20.w, right: 20.w), + child: Text( + TranslationLoader.lanKeys!.importOtherLockDataTip!.tr, + style: TextStyle(fontSize: 22.sp), + )), + _searchWidget(), + SizedBox( + height: 10.h, + ), + Expanded(child: _buildMainUI()), + SizedBox( + height: 20.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}), + ), + SizedBox( + height: 40.h, + ) + ], + ), + ); } Widget _searchWidget() { return Container( height: 60.h, - margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w), + margin: EdgeInsets.only(top: 30.w, left: 20.w, right: 10.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(5)), child: TextField( @@ -92,14 +102,21 @@ class _ImportOtherLockDataPageState extends State { } Widget _buildMainUI() { - return ListView.builder( - itemCount: 20, - itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_lock.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { - // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); - }); + return ListView.separated( + itemCount: 2, + itemBuilder: (c, index) { + return _electronicKeyItem('images/icon_round_unSelet.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { + // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); } Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, @@ -107,8 +124,8 @@ class _ImportOtherLockDataPageState extends State { return GestureDetector( onTap: action, child: Container( - height: 100.h, - margin: EdgeInsets.only(top: 15.h), + height: 60.h, + // margin: EdgeInsets.only(top: 15.h), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), @@ -120,12 +137,20 @@ class _ImportOtherLockDataPageState extends State { ), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 30.w, + height: 30.w, ), SizedBox( - width: 30.w, + width: 10.w, ), + Text( + 'test锁', + style: TextStyle( + color: AppColors.blackColor, + fontSize: 22.sp, + fontWeight: FontWeight.w600), + ), + /* Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -166,6 +191,7 @@ class _ImportOtherLockDataPageState extends State { ], ), ), + */ SizedBox(width: 20.h), ], ), diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart index dd290d2b..6a777fb7 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockEscalation/lockEscalation_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -20,37 +19,58 @@ class _LockEscalationPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.lockEscalation!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ - SizedBox(height: 60.h,), + SizedBox( + height: 60.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Image.asset('images/main/icon_main_lockSet_lockEscalation.png', width: 40.w, height: 40.w,), - SizedBox(width: 10.w,), - Text(TranslationLoader.lanKeys!.haveNewVersion!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w600),) + Image.asset( + 'images/main/icon_main_lockSet_lockEscalation.png', + width: 36.w, + height: 36.w, + ), + SizedBox( + width: 10.w, + ), + Text( + TranslationLoader.lanKeys!.haveNewVersion!.tr, + style: + TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600), + ) ], ), - SizedBox(height: 30.h,), - Text("${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0"), - SizedBox(height: 10.h,), - Text("${TranslationLoader.lanKeys!.newVersion!.tr}:1.0.1", style: TextStyle(color: AppColors.mainColor),), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.upgrade!.tr, - borderRadius: 20.w, - fontSize: 32.sp, - // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } + SizedBox( + height: 30.h, ), + Text( + "${TranslationLoader.lanKeys!.currentVersion!.tr}:1.0.0", + style: TextStyle( + fontSize: 18.sp, color: AppColors.darkGrayTextColor), + ), + SizedBox( + height: 10.h, + ), + Text( + "${TranslationLoader.lanKeys!.newVersion!.tr}:1.0.1", + style: TextStyle(color: AppColors.mainColor, fontSize: 18.sp), + ), + SizedBox( + height: 40.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.upgrade!.tr, + onClick: () {}), ], ), - ) - ); + )); } } 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 f11735e8..0d4719ce 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockSoundSet/lockSoundSet_page.dart @@ -38,13 +38,17 @@ class _LockSoundSetPageState extends State { height: 10.h, ), Container( - padding: EdgeInsets.all(30.w), - color: Colors.white, + padding: EdgeInsets.only( + left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), + // color: Colors.white, child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Expanded( - child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)), + child: Text( + TranslationLoader.lanKeys!.lockSoundTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), ), @@ -73,8 +77,8 @@ class _LockSoundSetPageState extends State { children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -90,8 +94,8 @@ class _LockSoundSetPageState extends State { children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -107,8 +111,8 @@ class _LockSoundSetPageState extends State { children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -124,8 +128,8 @@ class _LockSoundSetPageState extends State { children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -141,8 +145,8 @@ class _LockSoundSetPageState extends State { children: [ Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -150,14 +154,14 @@ class _LockSoundSetPageState extends State { ], ), )), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.save!.tr, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: () { - // Navigator.pushNamed(context, Routers.nearbyLockPage); - }), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 30.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.save!.tr, + onClick: () { + // Navigator.pushNamed(context, Routers.nearbyLockPage); + }), + ), ], )); } diff --git a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart index a6b70c3b..30ebb586 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/lockTime/lockTime_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -16,45 +15,51 @@ class LockTimePage extends StatefulWidget { } class _LockTimePageState extends State { - @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockTime!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.lockTime!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ - SizedBox(height: 50.h,), + SizedBox( + height: 50.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("2023.07.10 11.47.33", style: TextStyle(fontSize: 36.sp)), + Text("2023.07.10 11.47.33", + style: TextStyle( + fontSize: 26.sp, color: AppColors.blackColor)), ], ), - SizedBox(height: 60.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.calibrationTime!.tr, + SizedBox( + height: 60.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.calibrationTime!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } + onClick: () {}), + SizedBox( + height: 40.h, ), - SizedBox(height: 40.h,), GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Container( - child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr, style: TextStyle(fontSize: 30.sp, color: AppColors.mainColor)) - ), + child: Text(TranslationLoader.lanKeys!.setTheDSTMode!.tr, + style: TextStyle( + fontSize: 24.sp, color: AppColors.mainColor))), ), ], ), - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart index f36e0500..96e8fdd9 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/markedHouseState/markedHouseState_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -21,37 +20,59 @@ class _MarkedHouseStatePageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.markedHouseState!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( child: Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.leisure!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, + CommonItem( + leftTitel: TranslationLoader.lanKeys!.leisure!.tr, + rightTitle: "", + isHaveLine: true, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) - ), - CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true, + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.checkedIn!.tr, + rightTitle: "", + isHaveLine: false, + isHaveRightWidget: true, rightWidget: GestureDetector( - onTap: (){ - - }, - child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),) + onTap: () {}, + child: Row( + children: [ + Image.asset( + 'images/icon_round_unSelet.png', + width: 30.w, + height: 30.w, + ), + ], + ), + )), + SizedBox( + height: 60.h, ), - SizedBox(height: 60.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, + SubmitBtn( + btnName: TranslationLoader.lanKeys!.sure!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), + onClick: () {}), ], ), - ) - ); + )); } } 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 805b157b..de5cc7d4 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/normallyOpenMode/normallyOpenMode_page.dart @@ -38,14 +38,17 @@ class _NormallyOpenModePageState extends State { height: 10.h, ), Container( - padding: EdgeInsets.all(30.w), + padding: EdgeInsets.only( + left: 30.w, right: 30.w, top: 20.w, bottom: 20.w), color: Colors.white, child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Expanded( child: Text( - TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)), + TranslationLoader.lanKeys!.normallyOpenModeTip!.tr, + style: TextStyle(fontSize: 20.sp), + )), ], ), ), @@ -66,14 +69,14 @@ class _NormallyOpenModePageState extends State { ], ), )), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.save!.tr, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: () { - // Navigator.pushNamed(context, Routers.nearbyLockPage); - }), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 30.h), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.save!.tr, + onClick: () { + // Navigator.pushNamed(context, Routers.nearbyLockPage); + }), + ), ], )); } @@ -89,11 +92,11 @@ class _NormallyOpenModePageState extends State { Container( height: 60.h, // color: Colors.red, - padding: EdgeInsets.only(left: 20.h, top: 15.h), + padding: EdgeInsets.only(left: 30.w, top: 15.h), child: Text( - "${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}", + "${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.date!.tr}", style: - TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))), + TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))), Container( height: 90.h, padding: EdgeInsets.only(left: 10.w, right: 10.w), @@ -141,15 +144,19 @@ class _NormallyOpenModePageState extends State { return GestureDetector( onTap: () {}, child: Container( - width: 70.h, - height: 70.h, - margin: EdgeInsets.all(10.h), + width: 40.w, + height: 40.w, + margin: EdgeInsets.all(10.w), decoration: BoxDecoration( // color: Colors.blue, - border: Border.all(width: 1, color: Colors.grey), - borderRadius: BorderRadius.circular(60.w), + border: Border.all(width: 1, color: AppColors.btnDisableColor), + borderRadius: BorderRadius.circular(30.w), ), - child: Center(child: Text(dateStr)), + child: Center( + child: Text( + dateStr, + style: TextStyle(fontSize: 20.sp, color: AppColors.darkGrayTextColor), + )), ), ); } @@ -163,7 +170,7 @@ class _NormallyOpenModePageState extends State { ), CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}", + "${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.time!.tr}", rightTitle: "", isHaveLine: true, isHaveRightWidget: true, @@ -171,14 +178,17 @@ class _NormallyOpenModePageState extends State { onTap: () {}, child: Row( children: [ - Text(TranslationLoader.lanKeys!.allDay!.tr), + Text( + TranslationLoader.lanKeys!.allDay!.tr, + style: TextStyle(fontSize: 22.sp), + ), SizedBox( width: 5.w, ), Image.asset( 'images/icon_round_unSelet.png', - width: 40.w, - height: 40.w, + width: 30.w, + height: 30.w, ), ], ), @@ -191,14 +201,14 @@ class _NormallyOpenModePageState extends State { children: [ CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}", + "${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}", rightTitle: "", isHaveDirection: true, isHaveLine: true, action: () {}), CommonItem( leftTitel: - "${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}", + "${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}", rightTitle: "", isHaveDirection: true, action: () {}), diff --git a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart index 48f3bb85..e06741c6 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/remoteUnlocking/remoteUnlocking_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -20,37 +19,47 @@ class _RemoteUnlockingPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.remoteUnlocking!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr)), + Expanded( + child: Text( + TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr, + style: TextStyle( + fontSize: 20.sp, color: AppColors.darkGrayTextColor), + )), ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 20.h, + ), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), + Expanded( + child: Text( + "${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", + style: + TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp), + )), ], ), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, - borderRadius: 20.w, - fontSize: 32.sp, - // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } + SizedBox( + height: 40.h, ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.closed!.tr, + onClick: () {}), ], ), - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart index c4582299..15658545 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/resetButton/resetButton_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -20,38 +19,63 @@ class _ResetButtonPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetButton!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:Container( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.resetButton!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Container( padding: EdgeInsets.all(30.w), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text(TranslationLoader.lanKeys!.resetButtonTip!.tr)), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationLoader.lanKeys!.resetButtonTip1!.tr, + style: TextStyle(fontSize: 20.sp), + ), + SizedBox( + height: 10.h, + ), + Text( + TranslationLoader.lanKeys!.resetButtonTip2!.tr, + style: TextStyle(fontSize: 20.sp), + ) + ], + )), ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 30.h, + ), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)), + Expanded( + child: Text( + "${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", + style: + TextStyle(fontWeight: FontWeight.w600, fontSize: 20.sp), + )), ], ), - SizedBox(height: 30.h,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr, + SizedBox( + height: 30.h, + ), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.closed!.tr, borderRadius: 20.w, fontSize: 32.sp, // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } - ), + onClick: () {}), ], ), - ) - ); + )); } } - diff --git a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart index 8673edf5..70c7e107 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/unlockQRCode/unlockQRCode_page.dart @@ -34,7 +34,9 @@ class _UnlockQRCodePageState extends State { borderRadius: BorderRadius.all(Radius.circular(10.h)), ), child: Text( - "拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边")), + "拥有电子钥匙的人,通过微信扫一扫这个二维码,即可开门。每把锁的二维码都不相同,你可以将其打印出来贴在对应的锁旁边", + style: TextStyle(fontSize: 20.sp), + )), Container( width: 1.sw, padding: EdgeInsets.only(top: 50.w), @@ -51,24 +53,22 @@ class _UnlockQRCodePageState extends State { // size:300, // ), // QrImage(data: 'www.baidu.com', size: 300.w), - QrImageView(data: 'www.baidu.com', size: 300.w), - SizedBox(height: 50.w,), - SubmitBtn(btnName: TranslationLoader.lanKeys!.share!.tr, - borderRadius: 20.w, - fontSize: 32.sp, - width: 250.w, - // margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w), - padding: EdgeInsets.only(top: 20.w, bottom: 20.w), - onClick: () { - - } + QrImageView(data: 'www.baidu.com', size: 260.w), + SizedBox( + height: 50.w, ), - SizedBox(height: 60.w,) + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.share!.tr, + onClick: () {}), + ), + SizedBox( + height: 60.w, + ) ], - ) - ), + )), ], - ) - ); + )); } } diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart index a1371278..9c10986a 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboard/addWirelessKeyboard_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -13,69 +12,87 @@ class AddWirelessKeyboardPage extends StatefulWidget { const AddWirelessKeyboardPage({Key? key}) : super(key: key); @override - State createState() => _AddWirelessKeyboardPageState(); + State createState() => + _AddWirelessKeyboardPageState(); } class _AddWirelessKeyboardPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), + body: ListView( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationLoader.lanKeys!.lightTouchScreen!.tr, + style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), + ), + ], + ), + SizedBox( + height: 90.h, + ), + Image.asset( + 'images/main/icon_addWirelessKeyboardTip.png', + width: 260.w, + height: 260.w, + ), + SizedBox( + height: 90.h, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, + style: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor), + ), + ], + ), + SizedBox( + height: 90.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.next!.tr, + onClick: () { + Navigator.pushNamed( + context, Routers.seletWirelessKeyboardPage); + }), + ), + SizedBox( + height: 20.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr, + onClick: () { + Navigator.pushNamed( + context, Routers.addWirelessKeyboardScreenNotLightOnPage); + }), + ), + ], + ), + ); + } -@override -Widget build(BuildContext context) { - return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), - body: ListView( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox(height: 100.h,), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), - ], - ), - SizedBox(height: 90.h,), - Image.asset('images/main/icon_addWirelessKeyboardTip.png', width: 300.w, height: 300.w,), - SizedBox(height: 90.h,), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), - ], - ), - SizedBox(height: 90.h,), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.next!.tr, - borderRadius: 10.w, - fontSize: 28.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), - padding: EdgeInsets.only(top: 15.w, bottom: 15.w), - onClick: (){ - Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage); - } - ), - // SizedBox(height: 20.h,), - SubmitBtn( - btnName:TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr, - borderRadius: 10.w, - fontSize: 28.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w), - padding: EdgeInsets.only(top: 15.w, bottom: 15.w), - onClick: (){ - Navigator.pushNamed(context, Routers.addWirelessKeyboardScreenNotLightOnPage); - } - ), - ], - ), - ); -} - - -void onShow(){ - -} - -void onHide(){ - -} + void onShow() {} + + void onHide() {} } diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart index bcb4d1e9..5efce422 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/addWirelessKeyboardScreenNotLightOn/addWirelessKeyboardScreenNotLightOn_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -13,64 +12,88 @@ class AddWirelessKeyboardScreenNotLightOnPage extends StatefulWidget { const AddWirelessKeyboardScreenNotLightOnPage({Key? key}) : super(key: key); @override - State createState() => _AddWirelessKeyboardScreenNotLightOnPageState(); + State createState() => + _AddWirelessKeyboardScreenNotLightOnPageState(); } -class _AddWirelessKeyboardScreenNotLightOnPageState extends State { - +class _AddWirelessKeyboardScreenNotLightOnPageState + extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), body: ListView( // mainAxisAlignment: MainAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: 100.h,), + SizedBox( + height: 100.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys!.enterNumberOrPressSet!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),), + Text( + TranslationLoader.lanKeys!.enterNumberOrPressSet!.tr, + style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), + ), ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 20.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text("(${TranslationLoader.lanKeys!.theLocationOfTheSetKeyWillBeDifferent!.tr})", style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500),), + Text( + "(${TranslationLoader.lanKeys!.theLocationOfTheSetKeyWillBeDifferent!.tr})", + style: TextStyle(fontSize: 20.sp), + ), ], ), - SizedBox(height: 90.h,), - Image.asset('images/main/icon_addWirelessKeyboardUnLightOnTip.png', width: 300.w, height: 300.w,), - SizedBox(height: 90.h,), + SizedBox( + height: 90.h, + ), + Image.asset( + 'images/main/icon_addWirelessKeyboardUnLightOnTip.png', + width: 260.w, + height: 260.w, + ), + SizedBox( + height: 90.h, + ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text(TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),), + Text( + TranslationLoader.lanKeys!.whenScreenFlashesClickNext!.tr, + style: TextStyle( + fontSize: 22.sp, color: AppColors.darkGrayTextColor), + ), ], ), - SizedBox(height: 90.h,), - SubmitBtn( - btnName: TranslationLoader.lanKeys!.next!.tr, - borderRadius: 10.w, - fontSize: 28.sp, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w), - padding: EdgeInsets.only(top: 15.w, bottom: 15.w), - onClick: (){ - Navigator.pushNamed(context, Routers.seletWirelessKeyboardPage); - } + SizedBox( + height: 90.h, + ), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: SubmitBtn( + btnName: TranslationLoader.lanKeys!.next!.tr, + onClick: () { + Navigator.pushNamed( + context, Routers.seletWirelessKeyboardPage); + }), ), ], ), ); } - void onShow(){ + void onShow() {} - } - - void onHide(){ - - } + void onHide() {} } diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart index c7823c54..cb8f7d8e 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/seletWirelessKeyboard/seletWirelessKeyboard_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -11,7 +10,8 @@ class SeletWirelessKeyboardPage extends StatefulWidget { const SeletWirelessKeyboardPage({Key? key}) : super(key: key); @override - State createState() => _SeletWirelessKeyboardPageState(); + State createState() => + _SeletWirelessKeyboardPageState(); } class _SeletWirelessKeyboardPageState extends State { @@ -19,19 +19,23 @@ class _SeletWirelessKeyboardPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.selet!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), body: ListView.builder( - itemCount:20, - itemBuilder: (c, index){ - return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){ + itemCount: 20, + itemBuilder: (c, index) { + return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () { // Navigator.pushNamed(context, Routers.saveLockPage); }); - } - ), + }), ); } - Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){ + Widget nearbyLockItem( + String lockTypeIcon, String lockTypeTitle, Function() action) { return GestureDetector( onTap: action, child: Column( @@ -44,31 +48,41 @@ class _SeletWirelessKeyboardPageState extends State { children: [ // SizedBox(width:20.w), // Image.asset(lockTypeIcon, width: 50.w, height: 50.w,), - SizedBox(width:20.w), + SizedBox(width: 20.w), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 24.sp, + ), + ), ], ), ), - SizedBox(width:20.w), - Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,), - SizedBox(width:30.w), + SizedBox(width: 20.w), + Image.asset( + 'images/main/icon_main_addLock.png', + width: 36.w, + height: 36.w, + ), + SizedBox(width: 30.w), ], ), ), - Container(height: 0.5.h, color: Colors.grey,) + Container( + height: 0.5.h, + color: Colors.grey, + ) ], ), ); } - void onShow(){ - } + void onShow() {} - void onHide(){ - } + void onHide() {} } diff --git a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart index 791b7523..45e47c64 100644 --- a/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart +++ b/star_lock/lib/main/lockDetail/lcokSet/wirelessKeyboard/wirelessKeyboardList/wirelessKeyboard_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -21,56 +20,72 @@ class _WirelessKeyboardPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - TextButton( - child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),), - onPressed: (){ - - },), - ],), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.wirelessKeyboard!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + TextButton( + child: Text( + TranslationLoader.lanKeys!.reset!.tr, + style: TextStyle(color: Colors.white, fontSize: 24.sp), + ), + onPressed: () {}, + ), + ], + ), body: Column( children: [ Expanded(child: _buildMainUI()), SubmitBtn( - btnName: "${TranslationLoader.lanKeys!.add!.tr} ${TranslationLoader.lanKeys!.wirelessKeyboard!.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: (){ + btnName: + "${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}", + onClick: () { Navigator.pushNamed(context, Routers.addWirelessKeyboardPage); - } - ), + }), + SizedBox( + height: 40.h, + ) ], ), ); } - Widget _buildMainUI(){ + Widget _buildMainUI() { return ListView.builder( - itemCount:10, - itemBuilder: (c, index){ - return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){ + itemCount: 10, + itemBuilder: (c, index) { + return _electronicKeyItem('images/icon_password.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); - } - ); + }); } - Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){ + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { return GestureDetector( onTap: action, child: Container( - height: 100.h, + height: 90.h, margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( + decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), ), child: Row( children: [ - SizedBox(width: 30.w,), - Image.asset(lockTypeIcon, width: 50.w, height: 50.w,), - SizedBox(width: 30.w,), + SizedBox( + width: 30.w, + ), + Image.asset( + lockTypeIcon, + width: 40.w, + height: 40.w, + ), + SizedBox( + width: 20.w, + ), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -80,26 +95,33 @@ class _WirelessKeyboardPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ), + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 24.sp, color: AppColors.blackColor), + ), // SizedBox(width:20.w), // Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ), ], ), ), - SizedBox(width:20.w), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text("2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ), - ], - ), + SizedBox(width: 20.h), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "2023.6.21 11.15", + style: TextStyle( + fontSize: 18.sp, + color: AppColors.placeholderTextColor), + ), + ], ), - SizedBox(width:20.h), + // SizedBox(width: 20.h), ], ), ), - SizedBox(width:20.h), + SizedBox(width: 20.h), ], ), ), diff --git a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart index 06924cd6..c362f9ed 100644 --- a/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart +++ b/star_lock/lib/main/lockDetail/lockOperatingRecord/lockOperatingRecord_page.dart @@ -24,6 +24,29 @@ class _LockOperatingRecordPageState extends State { barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr, haveBack: true, backgroundColor: AppColors.mainColor, + actionsList: [ + IconButton( + icon: Image.asset( + 'images/icon_bar_more.png', + height: 30.h, + width: 10.w, + ), + onPressed: () { + JhPopMenus.showLinePop(context, clickCallback: (index, selText) { + print('选中index: $index'); + print('选中text: $selText'); + + if (selText == '添加朋友') { + // JhNavUtils.pushNamed(context, 'WxAddFriendPage'); + } + if (selText == '扫一扫') { + // _scan(); + } + }); + }, + ), + ], + /* actionsList: [ TextButton( child: const Text( @@ -45,6 +68,7 @@ class _LockOperatingRecordPageState extends State { }, ), ], + */ ), body: Column( children: [ @@ -54,7 +78,7 @@ class _LockOperatingRecordPageState extends State { child: Text( TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr, textAlign: TextAlign.start, - style: TextStyle(fontSize: 24.sp), + style: TextStyle(fontSize: 20.sp), ), ), _searchWidget(), @@ -67,7 +91,7 @@ class _LockOperatingRecordPageState extends State { Widget _searchWidget() { return Container( height: 60.h, - margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w), + margin: EdgeInsets.only(left: 20.w, right: 10.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(5)), child: TextField( @@ -106,8 +130,8 @@ class _LockOperatingRecordPageState extends State { if (index % 2 == 0) { return _dateItem("2023-06-29"); } else { - return _operatingRecordItem('images/controls_user.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { + return _operatingRecordItem('images/controls_user.png', + "186823150237", "17:56:08用APP开锁", "", () { // Navigator.pushNamed(context, Routers.electronicKeyDetailPage); }); } @@ -116,14 +140,14 @@ class _LockOperatingRecordPageState extends State { Widget _dateItem(String lockDate) { return Container( - height: 70.h, + height: 60.h, // color: Colors.red, padding: EdgeInsets.only(left: 20.h, right: 20.h), child: Row( children: [ Text( lockDate, - style: TextStyle(fontSize: 28.sp), + style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor), ), ], ), @@ -143,16 +167,13 @@ class _LockOperatingRecordPageState extends State { ), child: Row( children: [ - SizedBox( - width: 20.w, - ), Image.asset( lockTypeIcon, width: 50.w, height: 50.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -163,7 +184,7 @@ class _LockOperatingRecordPageState extends State { Text( lockTypeTitle, style: TextStyle( - fontSize: 28.sp, color: AppColors.blackColor), + fontSize: 24.sp, color: AppColors.blackColor), ), ], ), @@ -173,9 +194,9 @@ class _LockOperatingRecordPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "2023.6.21 11.15-2023.6.21 11.15", + "17:56:08用APP开锁", style: TextStyle( - fontSize: 28.sp, + fontSize: 20.sp, color: AppColors.darkGrayTextColor), ), ], diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart index f791edb4..3616dc0b 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeAddKey/otherTypeAddKey_page.dart @@ -10,14 +10,15 @@ import '../../../../translations/trans_lib.dart'; class OtherTypeAddKeyPage extends StatefulWidget { final String seletType; final int lockType; - const OtherTypeAddKeyPage({Key? key, required this.seletType, required this.lockType}) : super(key: key); + const OtherTypeAddKeyPage( + {Key? key, required this.seletType, required this.lockType}) + : super(key: key); @override State createState() => _OtherTypeAddKeyPageState(); } class _OtherTypeAddKeyPageState extends State { - final TextEditingController _controller = TextEditingController(); @override @@ -25,7 +26,7 @@ class _OtherTypeAddKeyPageState extends State { return indexChangeWidget(); } - Widget indexChangeWidget(){ + Widget indexChangeWidget() { switch (int.parse(widget.seletType)) { case 0: { @@ -33,7 +34,11 @@ class _OtherTypeAddKeyPageState extends State { // return sendElectronicKeySucceed(); return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, + TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), + SizedBox( + height: 30.h, + ), keyBottomWidget() ], ); @@ -43,8 +48,12 @@ class _OtherTypeAddKeyPageState extends State { // 限时 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, + TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), keyTimeLimitWidget(), + SizedBox( + height: 30.h, + ), keyBottomWidget() ], ); @@ -54,47 +63,68 @@ class _OtherTypeAddKeyPageState extends State { // 循环 return Column( children: [ - perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), - CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){ - // _showDatePicker(); - }), + perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, + TranslationLoader.lanKeys!.pleaseEnter!.tr, _controller), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + rightTitle: "", + isHaveDirection: true, + action: () { + // _showDatePicker(); + }), + SizedBox( + height: 30.h, + ), keyBottomWidget() ], ); } - break; default: return Container(); } } // 密码命名输入框 - Widget perpetualKeyWidget(String titleStr, String rightTitle, TextEditingController controller){ + Widget perpetualKeyWidget( + String titleStr, String rightTitle, TextEditingController controller) { return Column( children: [ Container(height: 10.h), - CommonItem(leftTitel:titleStr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(rightTitle)), + CommonItem( + leftTitel: titleStr, + rightTitle: "", + isHaveRightWidget: true, + rightWidget: getTFWidget(rightTitle)), Container(height: 10.h), ], ); } // 限时顶部选择日期 - Widget keyTimeLimitWidget(){ + Widget keyTimeLimitWidget() { return Column( children: [ - CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){ - // _showDatePicker(); - }), - CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){ - // _showDatePicker(); - }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + rightTitle: "2020.06.20 11:49", + isHaveLine: true, + isHaveDirection: true, + action: () { + // _showDatePicker(); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + rightTitle: "2020.06.20 11:49", + isHaveDirection: true, + action: () { + // _showDatePicker(); + }), Container(height: 10.h), ], ); } - Widget keyBottomWidget(){ + Widget keyBottomWidget() { return Column( children: [ // Container( @@ -106,17 +136,13 @@ class _OtherTypeAddKeyPageState extends State { // ], // ), // ), - SubmitBtn(btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(widget.lockType)}', borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), - onClick: (){ - - } - ), + SubmitBtn(btnName: TranslationLoader.lanKeys!.next!.tr, onClick: () {}), ], ); } // 发送电子钥匙成功 - Widget sendElectronicKeySucceed(){ + Widget sendElectronicKeySucceed() { return Column( children: [ Container( @@ -125,30 +151,67 @@ class _OtherTypeAddKeyPageState extends State { color: Colors.white, child: Column( children: [ - SizedBox(height: 30.h,), - Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,), - SizedBox(height: 20.h,), - Text("操作成功,密码为",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),), - SizedBox(height: 10.h,), - Text("62689876",style: TextStyle(fontSize: 60.sp, color: Colors.black, fontWeight: FontWeight.w500),), + SizedBox( + height: 30.h, + ), + Image.asset( + 'images/main/icon_main_addLock.png', + width: 150.w, + height: 150.w, + color: AppColors.mainColor, + ), + SizedBox( + height: 20.h, + ), + Text( + "操作成功,密码为", + style: TextStyle( + fontSize: 32.sp, + color: Colors.black, + fontWeight: FontWeight.w500), + ), + SizedBox( + height: 10.h, + ), + Text( + "62689876", + style: TextStyle( + fontSize: 60.sp, + color: Colors.black, + fontWeight: FontWeight.w500), + ), ], ), ), - SizedBox(height: 20.h,), - SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), - SubmitBtn(btnName: '分享', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), - SubmitBtn(btnName: '标记为:已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), + SizedBox( + height: 20.h, + ), + SubmitBtn( + btnName: '完成', + fontSize: 28.sp, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), + SubmitBtn( + btnName: '分享', + fontSize: 28.sp, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), + SubmitBtn( + btnName: '标记为:已入住', + fontSize: 28.sp, + borderRadius: 20.w, + margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), ], ); } - String getAppBarTitle(int type){ + String getAppBarTitle(int type) { String title; switch (type) { case 0: @@ -168,10 +231,10 @@ class _OtherTypeAddKeyPageState extends State { } // 接受者信息输入框 - Widget getTFWidget(String tfStr){ + Widget getTFWidget(String tfStr) { return Container( height: 50.h, - width: 500.w, + width: 300.w, child: Row( children: [ Expanded( @@ -180,20 +243,22 @@ class _OtherTypeAddKeyPageState extends State { maxLines: 1, // controller: _controller, autofocus: false, - textAlign:TextAlign.end, + textAlign: TextAlign.end, decoration: InputDecoration( //输入里面输入文字内边距设置 contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0), hintText: tfStr, + hintStyle: TextStyle(fontSize: 24.sp), //不需要输入框下划线 border: InputBorder.none, ), ), ), - SizedBox(width: 10.w,), + SizedBox( + width: 10.w, + ), ], ), ); } - } diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart index 12de22c9..94bc7074 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyDetail/otherTypeKeyDetail_page.dart @@ -33,7 +33,7 @@ class _OtherTypeKeyDetailPageState extends State { TextButton( child: Text( TranslationLoader.lanKeys!.share!.tr, - style: const TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () {}, ), 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 c745a7a5..5d4c034f 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyList/otherTypeKeyList_page.dart @@ -29,7 +29,7 @@ class _OtherTypeKeyListPageState extends State { TextButton( child: Text( TranslationLoader.lanKeys!.reset!.tr, - style: const TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () {}, ), @@ -38,18 +38,54 @@ class _OtherTypeKeyListPageState extends State { body: Column( children: [ _searchWidget(), + SizedBox( + height: 20.h, + ), Expanded(child: _buildMainUI(type)), - SubmitBtn( - btnName: - '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}', - 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.otherTypeKeyManagePage, - arguments: 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: () { + 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, + ) ], ), ); @@ -109,15 +145,34 @@ class _OtherTypeKeyListPageState extends State { } Widget _buildMainUI(int type) { - return ListView.builder( - itemCount: 10, - itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_lock.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage, - arguments: type); - }); + String typeImgName = ""; + if (type == 0) { + //卡 + typeImgName = 'images/icon_card.png'; + } else if (type == 1) { + //指纹 + typeImgName = 'images/icon_fingerprint.png'; + } else { + //遥控 + typeImgName = 'images/icon_card.png'; + } + + return ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem( + typeImgName, "张三", "2023.6.21 11.15", "2023.6.21 11.15", () { + Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage, + arguments: type); }); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); } Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, @@ -125,8 +180,8 @@ class _OtherTypeKeyListPageState extends State { return GestureDetector( onTap: action, child: Container( - height: 100.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), + height: 90.h, + // margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), @@ -138,11 +193,11 @@ class _OtherTypeKeyListPageState extends State { ), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -154,7 +209,7 @@ class _OtherTypeKeyListPageState extends State { Text( lockTypeTitle, style: TextStyle( - fontSize: 32.sp, fontWeight: FontWeight.w500), + fontSize: 24.sp, color: AppColors.blackColor), ), ], ), @@ -164,9 +219,10 @@ class _OtherTypeKeyListPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "2023.6.21 11.15 永久", + "2023.6.21 18:26 永久", style: TextStyle( - fontSize: 28.sp, fontWeight: FontWeight.w500), + fontSize: 18.sp, + color: AppColors.placeholderTextColor), ), ], ), diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart index 0d0871f3..2606e409 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_page.dart @@ -14,14 +14,18 @@ class OtherTypeKeyManagePage extends StatefulWidget { } class _OtherTypeKeyManagePageState extends State { - var index=0; + var index = 0; @override Widget build(BuildContext context) { var lockType = ModalRoute.of(context)?.settings.arguments as int; return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.addTip!.tr} ${getAppBarTitle(lockType)}", haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.addTip!.tr}${getAppBarTitle(lockType)}", + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ OtherTypeKeyManageTabbar(initialIndex: index, lockType: lockType), @@ -30,7 +34,7 @@ class _OtherTypeKeyManagePageState extends State { ); } - String getAppBarTitle(int type){ + String getAppBarTitle(int type) { String title = ""; switch (type) { case 0: @@ -47,5 +51,4 @@ class _OtherTypeKeyManagePageState extends State { } return title; } - } diff --git a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart index 548517cb..fafb9f8a 100644 --- a/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/otherTypeKey/otherTypeKeyManage/otherTypeKeyManage_tabbar.dart @@ -8,15 +8,19 @@ import '../../../../translations/trans_lib.dart'; import '../otherTypeAddKey/otherTypeAddKey_page.dart'; class OtherTypeKeyManageTabbar extends StatefulWidget { - var initialIndex=1; - var lockType=0; - OtherTypeKeyManageTabbar({Key? key, required this.initialIndex, required this.lockType}) : super(key: key); + var initialIndex = 1; + var lockType = 0; + OtherTypeKeyManageTabbar( + {Key? key, required this.initialIndex, required this.lockType}) + : super(key: key); @override - State createState() => _OtherTypeKeyManageTabbarState(); + State createState() => + _OtherTypeKeyManageTabbarState(); } -class _OtherTypeKeyManageTabbarState extends State with SingleTickerProviderStateMixin { +class _OtherTypeKeyManageTabbarState extends State + with SingleTickerProviderStateMixin { late TabController _tabController; final List _itemTabs = [ @@ -29,45 +33,64 @@ class _OtherTypeKeyManageTabbarState extends State wit void initState() { // TODO: implement initState super.initState(); - _tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex); + _tabController = TabController( + vsync: this, + length: _itemTabs.length, + initialIndex: widget.initialIndex); } @override Widget build(BuildContext context) { return Expanded( child: Column( - children: [ - _tabBar(), - _pageWidget(), - ], - ) - ); + children: [ + _tabBar(), + _pageWidget(), + ], + )); } - TabBar _tabBar(){ + TabBar _tabBar() { return TabBar( controller: _tabController, tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } Tab _tab(ItemView item) { - return Tab(child: SizedBox(width: 1.sw/5, child: Text(item.title, textAlign: TextAlign.center))); + return Tab( + child: SizedBox( + width: 1.sw / 5, + child: Text(item.title, textAlign: TextAlign.center))); } - Widget _pageWidget(){ + Widget _pageWidget() { return Expanded( child: TabBarView( controller: _tabController, - children: _itemTabs.map((ItemView item) => OtherTypeAddKeyPage(seletType: item.seletType, lockType: widget.lockType,)).toList(), + children: _itemTabs + .map((ItemView item) => OtherTypeAddKeyPage( + seletType: item.seletType, + lockType: widget.lockType, + )) + .toList(), ), ); } diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart index 9d18d11c..feb3e201 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_page.dart @@ -28,9 +28,9 @@ class _PasswordKeyDetailPageState extends State { backgroundColor: AppColors.mainColor, actionsList: [ TextButton( - child: const Text( + child: Text( "分享", - style: TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () {}, ), 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 e2d59d7a..00bb1716 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyList/passwordKeyList_page.dart @@ -28,7 +28,7 @@ class _PasswordKeyListPageState extends State { TextButton( child: Text( TranslationLoader.lanKeys!.reset!.tr, - style: const TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontSize: 24.sp), ), onPressed: () {}, ), @@ -37,16 +37,59 @@ class _PasswordKeyListPageState extends State { body: Column( children: [ _searchWidget(), + SizedBox( + height: 20.h, + ), Expanded(child: _buildMainUI()), - 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: 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: () { + 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, + ) ], ), ); @@ -88,14 +131,21 @@ class _PasswordKeyListPageState extends State { } Widget _buildMainUI() { - return ListView.builder( - itemCount: 10, - itemBuilder: (c, index) { - return _electronicKeyItem('images/icon_lock.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.passwordKeyDetailPage); - }); + return ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem('images/icon_password.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { + Navigator.pushNamed(context, Routers.passwordKeyDetailPage); }); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); } Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, @@ -103,12 +153,9 @@ class _PasswordKeyListPageState extends State { return GestureDetector( onTap: action, child: Container( - height: 100.h, - margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10.w), - ), + height: 90.h, + // margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), + color: Colors.white, child: Row( children: [ SizedBox( @@ -116,11 +163,11 @@ class _PasswordKeyListPageState extends State { ), Image.asset( lockTypeIcon, - width: 50.w, - height: 50.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -132,7 +179,7 @@ class _PasswordKeyListPageState extends State { Text( lockTypeTitle, style: TextStyle( - fontSize: 32.sp, fontWeight: FontWeight.w500), + fontSize: 24.sp, color: AppColors.blackColor), ), ], ), @@ -142,9 +189,10 @@ class _PasswordKeyListPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text( - "2023.6.21 11.15 永久", + "2023.6.21 18:00 清空码", style: TextStyle( - fontSize: 28.sp, fontWeight: FontWeight.w500), + fontSize: 18.sp, + color: AppColors.placeholderTextColor), ), ], ), diff --git a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart index 0b1f8b16..d7f77edf 100644 --- a/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart +++ b/star_lock/lib/main/lockDetail/passwordKey/passwordKeyManage/passwordKeyManage_tabbar.dart @@ -8,14 +8,18 @@ import '../../../../translations/trans_lib.dart'; import '../passwordKey_Perpetual/passwordKey_perpetual_page.dart'; class PasswordKeyManageTabbarPage extends StatefulWidget { - var initialIndex=1; + var initialIndex = 1; - PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) : super(key: key); + PasswordKeyManageTabbarPage({Key? key, required this.initialIndex}) + : super(key: key); @override - State createState() => _PasswordKeyManageTabbarPageState(); + State createState() => + _PasswordKeyManageTabbarPageState(); } -class _PasswordKeyManageTabbarPageState extends State with SingleTickerProviderStateMixin { +class _PasswordKeyManageTabbarPageState + extends State + with SingleTickerProviderStateMixin { late TabController _tabController; final List _itemTabs = [ @@ -31,33 +35,44 @@ class _PasswordKeyManageTabbarPageState extends State _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 28.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } @@ -65,19 +80,26 @@ class _PasswordKeyManageTabbarPageState extends State PasswordKeyPerpetualPage(type: item.type,)).toList(), + children: _itemTabs + .map((ItemView item) => PasswordKeyPerpetualPage( + type: item.type, + )) + .toList(), ), ); } 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 3c9cb002..65b02b61 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 @@ -49,7 +49,6 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; case 1: { // 限时 @@ -64,7 +63,6 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; case 2: { // 单次 @@ -78,7 +76,6 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; case 3: { // 自定义 @@ -95,7 +92,6 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; case 4: { // 循环 @@ -110,7 +106,6 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; case 5: { // 清空 @@ -124,10 +119,8 @@ class _PasswordKeyPerpetualPageState extends State { ], ); } - break; default: return Container(); - break; } } @@ -136,78 +129,91 @@ class _PasswordKeyPerpetualPageState extends State { String titleStr, String rightTitle, TextEditingController controller) { return Column( children: [ - Container(height: 10.h), - CommonItem( - leftTitel: titleStr, - rightTitle: "", - isHaveRightWidget: true, - rightWidget: getTFWidget(rightTitle)), - Container(height: 10.h), + SizedBox(height: 10.h), + Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: CommonItem( + leftTitel: titleStr, + rightTitle: "", + isHaveRightWidget: true, + rightWidget: getTFWidget(rightTitle)), + ), + SizedBox(height: 10.h), ], ); } // 限时顶部选择日期 Widget keyTimeLimitWidget() { - return Column( - children: [ - CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, - rightTitle: "2020.06.20 11:49", - isHaveLine: true, - isHaveDirection: true, - action: () { - // _showDatePicker(); - }), - CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, - rightTitle: "2020.06.20 11:49", - isHaveDirection: true, - action: () { - // _showDatePicker(); - }), - Container(height: 10.h), - ], + return Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: Column( + children: [ + CommonItem( + leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + rightTitle: "2020.06.20 11:49", + isHaveLine: true, + isHaveDirection: true, + action: () { + // _showDatePicker(); + }), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + rightTitle: "2020.06.20 11:49", + isHaveDirection: true, + action: () { + // _showDatePicker(); + }), + Container(height: 10.h), + ], + ), ); } // 自定义是否永久 Widget keyIfPerpetualWidget() { - return Column( - children: [ - CommonItem( - leftTitel: TranslationLoader.lanKeys!.permanent!.tr, - rightTitle: "", - isHaveRightWidget: true, - rightWidget: Container(width: 80.w, height: 50.h, child: _switch()), - action: () {}), - Container(height: 10.h), - ], + return Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: Column( + children: [ + CommonItem( + leftTitel: TranslationLoader.lanKeys!.permanent!.tr, + rightTitle: "", + isHaveRightWidget: true, + rightWidget: + Container(width: 80.w, height: 50.h, child: _switch()), + action: () {}), + Container(height: 10.h), + ], + ), ); } // 循环 Widget keyCirculationWidget() { - return Column( - children: [ - CommonItem( - leftTitel: TranslationLoader.lanKeys!.recursiveDevice!.tr, - rightTitle: "周末", - isHaveLine: true, - isHaveDirection: true, - action: () {}), - CommonItem( - leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, - rightTitle: "10:00", - isHaveLine: true, - isHaveDirection: true, - action: () {}), - CommonItem( - leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, - rightTitle: "11:00", - isHaveDirection: true, - action: () {}), - ], + return Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w), + child: Column( + children: [ + CommonItem( + leftTitel: TranslationLoader.lanKeys!.recursiveDevice!.tr, + rightTitle: "周末", + isHaveLine: true, + isHaveDirection: true, + action: () {}), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr, + rightTitle: "10:00", + isHaveLine: true, + isHaveDirection: true, + action: () {}), + CommonItem( + leftTitel: TranslationLoader.lanKeys!.failureTime!.tr, + rightTitle: "11:00", + isHaveDirection: true, + action: () {}), + ], + ), ); } @@ -223,15 +229,16 @@ class _PasswordKeyPerpetualPageState extends State { child: Text( tipStr, textAlign: TextAlign.start, + style: TextStyle(fontSize: 20.sp), )), ], ), ), + SizedBox( + height: 20.h, + ), SubmitBtn( btnName: TranslationLoader.lanKeys!.getPassword!.tr, - borderRadius: 20.w, - margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), - padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: () {}), ], ); @@ -313,7 +320,7 @@ class _PasswordKeyPerpetualPageState extends State { Widget getTFWidget(String tfStr) { return Container( height: 50.h, - width: 500.w, + width: 300.w, child: Row( children: [ Expanded( @@ -327,6 +334,7 @@ class _PasswordKeyPerpetualPageState extends State { //输入里面输入文字内边距设置 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/main/lockMian/lockMain_page.dart b/star_lock/lib/main/lockMian/lockMain_page.dart index b944a478..dc86f95f 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([]); @@ -66,7 +65,7 @@ class _StarLockMainState extends State with BaseWidget { Widget getLockList() { return ListView.builder( - itemCount: 10, + itemCount: 5, itemBuilder: (c, index) { return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () { Navigator.pushNamed(context, Routers.lockDetailPage); diff --git a/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart index 2f8ac658..c9b9f818 100644 --- a/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart +++ b/star_lock/lib/mine/addLock/lockAddress/lockAddress_page.dart @@ -1,5 +1,5 @@ - import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import '../../../appRouters.dart'; @@ -19,14 +19,22 @@ class _LockAddressPageState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: "锁地址", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - TextButton( - child: Text("保存", style: const TextStyle(color: Colors.white),), - onPressed: (){ - Navigator.pushNamed(context, Routers.saveLockPage); - },), - ],), - body:Container() - ); + appBar: TitleAppBar( + barTitle: "锁地址", + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + TextButton( + child: Text( + "保存", + style: TextStyle(color: Colors.white, fontSize: 24.sp), + ), + onPressed: () { + Navigator.pushNamed(context, Routers.saveLockPage); + }, + ), + ], + ), + body: Container()); } } diff --git a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart index aefc1036..6bac3f95 100644 --- a/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart +++ b/star_lock/lib/mine/gateway/gatewayList/gatewayList_page.dart @@ -30,8 +30,8 @@ class _GatewayListPageState extends State { }, child: Image.asset( 'images/icon_add_white.png', - width: 40.w, - height: 40.w, + width: 36.w, + height: 36.w, )), SizedBox( width: 30.w, diff --git a/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart b/star_lock/lib/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart index 5ccef3b0..39191215 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: Container(width: 80.w, height: 50.h, child: _switch()), + rightWidget: SizedBox(width: 80.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 df90fec3..29e895e0 100644 --- a/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart +++ b/star_lock/lib/mine/mineSet/authorizedAdministrator/authorizedAdministratorList_page.dart @@ -27,7 +27,11 @@ class _AuthorizedAdministratorListPageState backgroundColor: AppColors.mainColor, actionsList: [ IconButton( - icon: Image.asset('images/icon_add_white.png'), + icon: Image.asset( + 'images/icon_add_white.png', + width: 36.w, + height: 36.w, + ), onPressed: () { // 处理操作按钮的点击事件 Navigator.pushNamed( @@ -82,7 +86,7 @@ class _AuthorizedAdministratorListPageState Widget _buildMainUI() { return ListView.builder( - itemCount: 10, + itemCount: 5, itemBuilder: (c, index) { return _electronicKeyItem('images/controls_user.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15", () { @@ -109,11 +113,11 @@ class _AuthorizedAdministratorListPageState ), Image.asset( lockTypeIcon, - width: 44.w, - height: 44.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -125,23 +129,21 @@ class _AuthorizedAdministratorListPageState Text( lockTypeTitle, style: TextStyle( - fontSize: 24.sp, fontWeight: FontWeight.w500), + fontSize: 24.sp, color: AppColors.blackColor), ), ], ), SizedBox(height: 5.h), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - "2023.6.21 11.15 永久", - style: TextStyle( - fontSize: 20.sp, - color: AppColors.darkGrayTextColor), - ), - ], - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "2023.6.21 11.15 永久", + style: TextStyle( + fontSize: 18.sp, + color: AppColors.placeholderTextColor), + ), + ], ), SizedBox(width: 20.h), ], diff --git a/star_lock/lib/mine/mineSet/lockGroup/lockGroupList_page.dart b/star_lock/lib/mine/mineSet/lockGroup/lockGroupList_page.dart index e6289123..85323824 100644 --- a/star_lock/lib/mine/mineSet/lockGroup/lockGroupList_page.dart +++ b/star_lock/lib/mine/mineSet/lockGroup/lockGroupList_page.dart @@ -26,7 +26,11 @@ class _LockGroupListPageState extends State { haveBack: true, actionsList: [ IconButton( - icon: Image.asset('images/icon_add_white.png'), + icon: Image.asset( + 'images/icon_add_white.png', + width: 36.w, + height: 36.w, + ), onPressed: () { // 处理操作按钮的点击事件-添加锁分组 }, diff --git a/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart b/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart index 9e9d83a5..5cc3ddab 100644 --- a/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart +++ b/star_lock/lib/mine/mineSet/lockUserManage/lockUserManageList_page.dart @@ -104,14 +104,21 @@ class _LockUserManageListListPageState } Widget _buildMainUI() { - return ListView.builder( - itemCount: 10, - itemBuilder: (c, index) { - return _electronicKeyItem('images/controls_user.png', "张三", - "2023.6.21 11.15", "2023.6.21 11.15", () { - Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); - }); + return ListView.separated( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem('images/controls_user.png', "张三", + "2023.6.21 11.15", "2023.6.21 11.15", () { + Navigator.pushNamed(context, Routers.ownedKeyListPage); }); + }, + separatorBuilder: (BuildContext context, int index) { + return const Divider( + height: 1, + color: AppColors.greyLineColor, + ); + }, + ); } Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, @@ -120,7 +127,6 @@ class _LockUserManageListListPageState onTap: action, child: Container( height: 90.h, - margin: EdgeInsets.only(top: 1.h), color: Colors.white, // decoration: BoxDecoration( // color: Colors.white, @@ -133,11 +139,11 @@ class _LockUserManageListListPageState ), Image.asset( lockTypeIcon, - width: 44.w, - height: 44.w, + width: 60.w, + height: 60.w, ), SizedBox( - width: 30.w, + width: 20.w, ), Expanded( child: Column( @@ -148,7 +154,8 @@ class _LockUserManageListListPageState children: [ Text( lockTypeTitle, - style: TextStyle(fontSize: 24.sp), + style: TextStyle( + fontSize: 24.sp, color: AppColors.blackColor), ), ], ), @@ -159,8 +166,8 @@ class _LockUserManageListListPageState Text( "2023.6.21 11.15 永久", style: TextStyle( - fontSize: 20.sp, - color: AppColors.darkGrayTextColor), + fontSize: 18.sp, + color: AppColors.placeholderTextColor), ), ], ), diff --git a/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart new file mode 100644 index 00000000..20d5c8b1 --- /dev/null +++ b/star_lock/lib/mine/mineSet/lockUserManage/ownedKeyList_page.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +import '../../../../appRouters.dart'; +import '../../../../app_settings/app_colors.dart'; +import '../../../../tools/titleAppBar.dart'; + +class OwnedKeyListPage extends StatefulWidget { + const OwnedKeyListPage({Key? key}) : super(key: key); + + @override + State createState() => _OwnedKeyListPageState(); +} + +class _OwnedKeyListPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: "拥有的钥匙", + haveBack: true, + backgroundColor: AppColors.mainColor, + ), + body: Column( + children: [ + _topOwnedKeyText(), + Expanded(child: _buildMainUI()), + ], + ), + ); + } + + Widget _topOwnedKeyText() { + return Container( + color: Colors.white, + width: ScreenUtil().screenWidth, + // margin: EdgeInsets.only(left: 30.w, top: 30.w, right: 30.w, bottom: 30.w), + child: Padding( + padding: + EdgeInsets.only(left: 30.w, top: 30.w, right: 20.w, bottom: 10.w), + child: Text( + "拥有的钥匙", + style: TextStyle(fontSize: 24.sp), + ), + ), + ); + } + + Widget _buildMainUI() { + return ListView.builder( + itemCount: 5, + itemBuilder: (c, index) { + return _electronicKeyItem('images/controls_user.png', "JBL01_5a3de9", + "2023.6.21 11.15", "2023.6.21 11.15", () { + Navigator.pushNamed(context, Routers.authorizedAdminDetailPage); + }); + }); + } + + Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, + String beginTime, String endTime, Function() action) { + return GestureDetector( + onTap: action, + child: Container( + height: 90.h, + margin: const EdgeInsets.only(top: 1), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10.w), + ), + child: Row( + children: [ + SizedBox( + width: 30.w, + ), + Image.asset( + lockTypeIcon, + width: 60.w, + height: 60.w, + ), + SizedBox( + width: 20.w, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + lockTypeTitle, + style: TextStyle( + fontSize: 24.sp, color: AppColors.blackColor), + ), + ], + ), + SizedBox(height: 5.h), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "2023.6.21 11.15 永久", + style: TextStyle( + fontSize: 18.sp, + color: AppColors.placeholderTextColor), + ), + ], + ), + SizedBox(width: 20.h), + ], + ), + ), + SizedBox(width: 20.h), + ], + ), + ), + ); + } +} diff --git a/star_lock/lib/mine/supportStaff/supportStaff_page.dart b/star_lock/lib/mine/supportStaff/supportStaff_page.dart index 6eac6db5..d44fe39d 100644 --- a/star_lock/lib/mine/supportStaff/supportStaff_page.dart +++ b/star_lock/lib/mine/supportStaff/supportStaff_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -17,35 +16,55 @@ class SupportStaffPage extends StatefulWidget { } class _SupportStaffPageState extends State { - @override Widget build(BuildContext context) { return Scaffold( backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.supportStaff!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.supportStaff!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ - supportStaffItem(TranslationLoader.lanKeys!.email!.tr, "786612630@qq.com", true, true, 'images/mine/icon_mine_supportStaff_openEmail.png',() async { - String url = 'mailto:smith@example.org?subject=News&body=New%20plugin' ; + supportStaffItem( + TranslationLoader.lanKeys!.email!.tr, + "786612630@qq.com", + true, + true, + 'images/mine/icon_mine_supportStaff_openEmail.png', () async { + String url = + 'mailto:smith@example.org?subject=News&body=New%20plugin'; _pushUrl(url); }), - supportStaffItem(TranslationLoader.lanKeys!.businessCooperation!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_openEmail.png',() async { + supportStaffItem( + TranslationLoader.lanKeys!.businessCooperation!.tr, + "www.starLock.com", + true, + true, + 'images/mine/icon_mine_supportStaff_openEmail.png', () async { const url = 'tel:15080825640'; _pushUrl(url); }), - supportStaffItem(TranslationLoader.lanKeys!.officialWebsite!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_jump.png',() async { + supportStaffItem( + TranslationLoader.lanKeys!.officialWebsite!.tr, + "www.starLock.com", + true, + true, + 'images/mine/icon_mine_supportStaff_jump.png', () async { const url = 'https://blog.csdn.net/shulianghan'; _pushUrl(url); }), - supportStaffItem(TranslationLoader.lanKeys!.computerWebVersion!.tr, "www.starLock.com", false, true, '',(){ - - }), - supportStaffItem(TranslationLoader.lanKeys!.hotelSystem!.tr, "www.starLock.com", false, true, '',(){ - - }), - supportStaffItem(TranslationLoader.lanKeys!.manualWebVersion!.tr, "www.starLock.com", true, true, 'images/mine/icon_mine_supportStaff_jump.png',(){ - - }), + supportStaffItem(TranslationLoader.lanKeys!.computerWebVersion!.tr, + "www.starLock.com", false, true, '', () {}), + supportStaffItem(TranslationLoader.lanKeys!.hotelSystem!.tr, + "www.starLock.com", false, true, '', () {}), + supportStaffItem( + TranslationLoader.lanKeys!.manualWebVersion!.tr, + "www.starLock.com", + true, + true, + 'images/mine/icon_mine_supportStaff_jump.png', + () {}), ], ), ); @@ -59,7 +78,14 @@ class _SupportStaffPageState extends State { } } - Widget supportStaffItem (String? leftTitel, String? rightTitle, bool? isHaveRightImg, bool? isHaveLine, String? rightImg, Function()? action,){ + Widget supportStaffItem( + String? leftTitel, + String? rightTitle, + bool? isHaveRightImg, + bool? isHaveLine, + String? rightImg, + Function()? action, + ) { return GestureDetector( onTap: action, child: Column( @@ -68,27 +94,42 @@ class _SupportStaffPageState extends State { Container( height: 80.h, color: Colors.white, - 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), - Expanded(child: Text(leftTitel!, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))), - SizedBox(width:20.w), + SizedBox(width: 20.w), + Expanded( + child: Text(leftTitel!, style: TextStyle(fontSize: 24.sp))), + SizedBox(width: 20.w), Row( mainAxisAlignment: MainAxisAlignment.end, - children: [Text(rightTitle!, textAlign: TextAlign.end, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500)) + children: [ + Text(rightTitle!, + textAlign: TextAlign.end, + style: TextStyle(fontSize: 22.sp)) ], ), - SizedBox(width:5.w), - isHaveRightImg!?Image.asset(rightImg!, width: 50.w, height: 50.w,):SizedBox(width:10.w), + SizedBox(width: 5.w), + isHaveRightImg! + ? Image.asset( + rightImg!, + width: 36.w, + height: 36.w, + ) + : SizedBox(width: 10.w), // SizedBox(width:10.w), ], ), ), - isHaveLine!?Container(height: 0.5.h, color: Colors.grey,):Container() + isHaveLine! + ? Container( + height: 0.5.h, + color: Colors.grey, + ) + : Container() ], ), ); } - } diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart index 776db24b..92bf8c84 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuy/valueAddedServicesBuy_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -12,11 +11,17 @@ class ValueAddedServicesBuyPage extends StatefulWidget { const ValueAddedServicesBuyPage({Key? key}) : super(key: key); @override - State createState() => _ValueAddedServicesBuyPageState(); + State createState() => + _ValueAddedServicesBuyPageState(); } class _ValueAddedServicesBuyPageState extends State { - final data = ["1", "2", "3", "4", ]; + final data = [ + "1", + "2", + "3", + "4", + ]; @override Widget build(BuildContext context) { @@ -24,21 +29,27 @@ class _ValueAddedServicesBuyPageState extends State { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle: _getNavTitle(type), haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: _getNavTitle(type), + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ Container( width: 1.sw, // height: 400.h, color: Colors.white, - padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h), + padding: EdgeInsets.only( + left: 25.h, right: 25.h, top: 25.h, bottom: 10.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(TranslationLoader.lanKeys!.chooseAPackage!.tr, style: TextStyle(fontSize: 32.sp),), + Text( + TranslationLoader.lanKeys!.chooseAPackage!.tr, + style: TextStyle(fontSize: 24.sp), + ), ], - ) - ), + )), Expanded( child: GridView.count( padding: EdgeInsets.all(10.w), @@ -51,40 +62,71 @@ class _ValueAddedServicesBuyPageState extends State { ), Container( color: Colors.white, - padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h), + padding: EdgeInsets.only( + left: 25.h, right: 25.h, top: 25.h, bottom: 10.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(TranslationLoader.lanKeys!.modeOfPayment!.tr, style: TextStyle(fontSize: 32.sp),), - SizedBox(height: 20.h,), + Text( + TranslationLoader.lanKeys!.modeOfPayment!.tr, + style: TextStyle(fontSize: 32.sp), + ), + SizedBox( + height: 20.h, + ), Row( children: [ - Image.asset('images/mine/icon_mine_valueAddedServices_zfb.png', width: 40.w, height: 40.w,), - SizedBox(width:20.w), - Expanded(child: Text(TranslationLoader.lanKeys!.alipay!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500))), - SizedBox(width:5.w), - Image.asset('images/icon_round_selet.png', width: 40.w, height: 40.w,) + Image.asset( + 'images/mine/icon_mine_valueAddedServices_zfb.png', + width: 40.w, + height: 40.w, + ), + SizedBox(width: 20.w), + Expanded( + child: Text(TranslationLoader.lanKeys!.alipay!.tr, + style: TextStyle( + fontSize: 28.sp, fontWeight: FontWeight.w500))), + SizedBox(width: 5.w), + Image.asset( + 'images/icon_round_selet.png', + width: 40.w, + height: 40.w, + ) ], ), - SizedBox(height: 20.h,), + SizedBox( + height: 20.h, + ), ], ), ), - Container(height: 10.h, color: const Color(0xFFF5F5F5),), + Container( + height: 10.h, + color: const Color(0xFFF5F5F5), + ), Container( height: 100.h, color: Colors.white, child: Row( children: [ - SizedBox(width:20.w), - Expanded(child: Text("¥50", style: TextStyle(fontSize: 36.sp, color: AppColors.mainColor, fontWeight: FontWeight.w500))), - SizedBox(width:5.w), + SizedBox(width: 20.w), + Expanded( + child: Text("¥50", + style: TextStyle( + fontSize: 36.sp, + color: AppColors.mainColor, + fontWeight: FontWeight.w500))), + SizedBox(width: 5.w), Container( width: 180.w, height: 100.h, color: AppColors.mainColor, - child: Center(child: Text(TranslationLoader.lanKeys!.goToPay!.tr, style: TextStyle(fontSize: 32.sp, color: Colors.white, fontWeight: FontWeight.w500))) - ) + child: Center( + child: Text(TranslationLoader.lanKeys!.goToPay!.tr, + style: TextStyle( + fontSize: 32.sp, + color: Colors.white, + fontWeight: FontWeight.w500)))) ], ), ) @@ -96,26 +138,31 @@ class _ValueAddedServicesBuyPageState extends State { Container _buildItem(String title) { return Container( margin: EdgeInsets.all(10.w), - padding: EdgeInsets.only(left:30.w, top: 20.h, bottom: 20.h), + padding: EdgeInsets.only(left: 30.w, top: 20.h, bottom: 20.h), decoration: BoxDecoration( - color: title == "1" ? const Color(0xFFEDF1FD):Colors.white, + color: title == "1" ? const Color(0xFFEDF1FD) : Colors.white, borderRadius: BorderRadius.all(Radius.circular(20.h)), - border: Border.all(width: 0.5.w, color: Colors.black) - ), + border: Border.all(width: 0.5.w, color: Colors.black)), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("500条", style: TextStyle(fontSize: 36.sp),), + Text( + "500条", + style: TextStyle(fontSize: 36.sp), + ), SizedBox(height: 10.h), - Text("¥50 (¥0.08/条)", style: TextStyle(fontSize: 32.sp),), + Text( + "¥50 (¥0.08/条)", + style: TextStyle(fontSize: 32.sp), + ), ], ), ); } - String _getNavTitle(int type){ + String _getNavTitle(int type) { String topTitle = ""; - switch(type){ + switch (type) { case 1: topTitle = TranslationLoader.lanKeys!.buySMS!.tr; break; @@ -123,7 +170,8 @@ class _ValueAddedServicesBuyPageState extends State { topTitle = TranslationLoader.lanKeys!.buyMail!.tr; break; case 3: - topTitle = TranslationLoader.lanKeys!.buyRealNameAuthenticationTimes!.tr; + topTitle = + TranslationLoader.lanKeys!.buyRealNameAuthenticationTimes!.tr; break; case 4: topTitle = TranslationLoader.lanKeys!.enablingAdvancedFeatures!.tr; diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuyAndUseRecord/valueAddedServicesBuyAndUseRecordManage/valueAddedServicesBuyAndUseRecordManage_tabbar.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuyAndUseRecord/valueAddedServicesBuyAndUseRecordManage/valueAddedServicesBuyAndUseRecordManage_tabbar.dart index 138b45a9..981ddf27 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuyAndUseRecord/valueAddedServicesBuyAndUseRecordManage/valueAddedServicesBuyAndUseRecordManage_tabbar.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesBuyAndUseRecord/valueAddedServicesBuyAndUseRecordManage/valueAddedServicesBuyAndUseRecordManage_tabbar.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -7,15 +6,20 @@ import '../../../../tools/CustomUnderlineTabIndicator.dart'; import '../valueAddedServicesBuyAndUseRecord_page.dart'; class ValueAddedServicesBuyAndUseRecordManageTabbar extends StatefulWidget { - var initialIndex=1; + var initialIndex = 1; - ValueAddedServicesBuyAndUseRecordManageTabbar({Key? key, required this.initialIndex}) : super(key: key); + ValueAddedServicesBuyAndUseRecordManageTabbar( + {Key? key, required this.initialIndex}) + : super(key: key); @override - State createState() => _ValueAddedServicesBuyAndUseRecordManageTabbarState(); + State createState() => + _ValueAddedServicesBuyAndUseRecordManageTabbarState(); } -class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State with SingleTickerProviderStateMixin { +class _ValueAddedServicesBuyAndUseRecordManageTabbarState + extends State + with SingleTickerProviderStateMixin { late TabController _tabController; final List _itemTabs = [ @@ -29,33 +33,44 @@ class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State _tab(item)).toList(), isScrollable: true, indicatorColor: Colors.red, unselectedLabelColor: Colors.black, - unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,), - automaticIndicatorColorAdjustment:true, + unselectedLabelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + ), + automaticIndicatorColorAdjustment: true, labelColor: AppColors.mainColor, - labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600), - indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w), + labelStyle: TextStyle( + color: AppColors.mainColor, + fontSize: 24.sp, + fontWeight: FontWeight.w600), + indicator: CustomUnderlineTabIndicator( + borderSide: BorderSide(color: AppColors.mainColor, width: 4.w), + strokeCap: StrokeCap.round, + width: 30.w), ); } @@ -63,19 +78,26 @@ class _ValueAddedServicesBuyAndUseRecordManageTabbarState extends State ValueAddedServicesBuyAndUseRecordPage(type: item.type,)).toList(), + children: _itemTabs + .map((ItemView item) => ValueAddedServicesBuyAndUseRecordPage( + type: item.type, + )) + .toList(), ), ); } diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart index 74ab8adc..a46fc62f 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -13,16 +12,23 @@ class ValueAddedServicesHighFunctionPage extends StatefulWidget { const ValueAddedServicesHighFunctionPage({Key? key}) : super(key: key); @override - State createState() => _ValueAddedServicesHighFunctionPageState(); + State createState() => + _ValueAddedServicesHighFunctionPageState(); } -class _ValueAddedServicesHighFunctionPageState extends State { +class _ValueAddedServicesHighFunctionPageState + extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.advancedFunction!.tr, haveBack:true, iconColor: Colors.black, titleColor: Colors.black, backgroundColor: Colors.white), - body:Column( + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.advancedFunction!.tr, + haveBack: true, + iconColor: Colors.black, + titleColor: Colors.black, + backgroundColor: Colors.white), + body: Column( children: [ Expanded( child: ListView( @@ -36,11 +42,10 @@ class _ValueAddedServicesHighFunctionPageState extends State createState() => _ValueAddedServicesPageListState(); + State createState() => + _ValueAddedServicesPageListState(); } -class _ValueAddedServicesPageListState extends State { +class _ValueAddedServicesPageListState + extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.valueAddedServices!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.valueAddedServices!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: ListView( - children: [ - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_note.png'), TranslationLoader.lanKeys!.note!.tr, (){ - Navigator.pushNamed(context, Routers.valueAddedServicesNoteAndEmailDetailPage, arguments: 1); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_email.png'), TranslationLoader.lanKeys!.mail!.tr, (){ - Navigator.pushNamed(context, Routers.valueAddedServicesNoteAndEmailDetailPage, arguments: 2); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_realName.png'), TranslationLoader.lanKeys!.realNameAuthentication!.tr, (){ - Navigator.pushNamed(context, Routers.valueAddedServicesRealNamePage); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'), TranslationLoader.lanKeys!.advancedFunction!.tr, (){ - Navigator.pushNamed(context, Routers.valueAddedServicesHighFunctionPage); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_push.png'), TranslationLoader.lanKeys!.pushMessage!.tr, (){ - // Navigator.pushNamed(context, Routers.gatewayDetailPage); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_checkIn.png'), TranslationLoader.lanKeys!.checkingIn!.tr, (){ - // Navigator.pushNamed(context, Routers.gatewayDetailPage); - }), - _valueAddedServicesItem(Image.asset('images/mine/icon_mine_valueAddedServices_storage.png'), TranslationLoader.lanKeys!.recordsRetention!.tr, (){ - // Navigator.pushNamed(context, Routers.gatewayDetailPage); - }), - _valueAddedServicesItem(Text("A", style: TextStyle(color: Colors.white, fontSize: 38.sp, fontWeight: FontWeight.w600),), "Amazon Alexa", (){ - // Navigator.pushNamed(context, Routers.gatewayDetailPage); - }), - _valueAddedServicesItem(Text("G", style: TextStyle(color: Colors.white, fontSize: 38.sp, fontWeight: FontWeight.w600),), "Google Home", (){ - // Navigator.pushNamed(context, Routers.gatewayDetailPage); - }), - ], + children: [ + _valueAddedServicesItem( + Image.asset('images/mine/icon_mine_valueAddedServices_note.png'), + TranslationLoader.lanKeys!.note!.tr, () { + Navigator.pushNamed( + context, Routers.valueAddedServicesNoteAndEmailDetailPage, + arguments: 1); + }), + _valueAddedServicesItem( + Image.asset('images/mine/icon_mine_valueAddedServices_email.png'), + TranslationLoader.lanKeys!.mail!.tr, () { + Navigator.pushNamed( + context, Routers.valueAddedServicesNoteAndEmailDetailPage, + arguments: 2); + }), + _valueAddedServicesItem( + Image.asset( + 'images/mine/icon_mine_valueAddedServices_realName.png'), + TranslationLoader.lanKeys!.realNameAuthentication!.tr, () { + Navigator.pushNamed( + context, Routers.valueAddedServicesRealNamePage); + }), + _valueAddedServicesItem( + Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'), + TranslationLoader.lanKeys!.advancedFunction!.tr, () { + Navigator.pushNamed( + context, Routers.valueAddedServicesHighFunctionPage); + }), + _valueAddedServicesItem( + Image.asset('images/mine/icon_mine_valueAddedServices_push.png'), + TranslationLoader.lanKeys!.pushMessage!.tr, () { + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }), + _valueAddedServicesItem( + Image.asset( + 'images/mine/icon_mine_valueAddedServices_checkIn.png'), + TranslationLoader.lanKeys!.checkingIn!.tr, () { + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }), + _valueAddedServicesItem( + Image.asset( + 'images/mine/icon_mine_valueAddedServices_storage.png'), + TranslationLoader.lanKeys!.recordsRetention!.tr, () { + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }), + _valueAddedServicesItem( + Text( + "A", + style: TextStyle( + color: Colors.white, + fontSize: 38.sp, + fontWeight: FontWeight.w600), + ), + "Amazon Alexa", () { + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }), + _valueAddedServicesItem( + Text( + "G", + style: TextStyle( + color: Colors.white, + fontSize: 38.sp, + fontWeight: FontWeight.w600), + ), + "Google Home", () { + // Navigator.pushNamed(context, Routers.gatewayDetailPage); + }), + ], ), ); } - Widget _valueAddedServicesItem(Widget widget, String gateWayName, Function() action){ + Widget _valueAddedServicesItem( + Widget widget, String gateWayName, Function() action) { return GestureDetector( onTap: action, child: Container( // height: 100.h, margin: EdgeInsets.only(top: 20.h, right: 20.w, left: 20.w), - padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h), - decoration: BoxDecoration( + padding: + EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h, bottom: 20.h), + decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10.w), ), child: Row( children: [ Container( - width: 70.w, - height: 70.w, + width: 60.w, + height: 60.w, padding: EdgeInsets.all(12.h), decoration: BoxDecoration( color: AppColors.mainColor, - borderRadius: BorderRadius.circular(40.w) - ), + borderRadius: BorderRadius.circular(40.w)), child: Center(child: widget), ), - SizedBox(width: 20.w,), - Expanded( - child: Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w600), ), + SizedBox( + width: 20.w, ), - SizedBox(width:20.h), - Image.asset('images/icon_right.png', width: 50.w, height: 50.w,) + Expanded( + child: Text( + gateWayName, + style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600), + ), + ), + SizedBox(width: 20.h), + Image.asset( + 'images/icon_right_grey.png', + width: 12.w, + height: 21.w, + ) ], ), ), ); } - } diff --git a/star_lock/lib/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart b/star_lock/lib/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart index fbf671d6..8c9bef33 100644 --- a/star_lock/lib/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart +++ b/star_lock/lib/mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -13,33 +12,45 @@ class ValueAddedServicesNoteAndEmailDetailPage extends StatefulWidget { const ValueAddedServicesNoteAndEmailDetailPage({Key? key}) : super(key: key); @override - State createState() => _ValueAddedServicesNoteAndEmailDetailPageState(); + State createState() => + _ValueAddedServicesNoteAndEmailDetailPageState(); } -class _ValueAddedServicesNoteAndEmailDetailPageState extends State { - +class _ValueAddedServicesNoteAndEmailDetailPageState + extends State { @override Widget build(BuildContext context) { var type = ModalRoute.of(context)?.settings.arguments as int; return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: type == 1?TranslationLoader.lanKeys!.note!.tr:TranslationLoader.lanKeys!.mail!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body: Column( - children: [ - Container( - width: 1.sw, - // color: Colors.grey.shade300, - padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h), - child: Text(type == 1?TranslationLoader.lanKeys!.smsBuyTip!.tr:TranslationLoader.lanKeys!.emailBuyTip!.tr) - ), - middleWidget(type), - ], - ), + backgroundColor: AppColors.mainBackgroundColor, + appBar: TitleAppBar( + barTitle: type == 1 + ? TranslationLoader.lanKeys!.note!.tr + : TranslationLoader.lanKeys!.mail!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: Column( + children: [ + Container( + width: 1.sw, + // color: Colors.grey.shade300, + padding: EdgeInsets.only( + left: 25.h, right: 25.h, top: 25.h, bottom: 10.h), + child: Text( + type == 1 + ? TranslationLoader.lanKeys!.smsBuyTip!.tr + : TranslationLoader.lanKeys!.emailBuyTip!.tr, + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 18.sp), + )), + middleWidget(type), + ], + ), ); } - Widget middleWidget(int type){ + Widget middleWidget(int type) { return Container( width: 1.sw, // height: 100, @@ -47,82 +58,103 @@ class _ValueAddedServicesNoteAndEmailDetailPageState extends State createState() => _ValueAddedServicesRealNamePageState(); + State createState() => + _ValueAddedServicesRealNamePageState(); } -class _ValueAddedServicesRealNamePageState extends State { - +class _ValueAddedServicesRealNamePageState + extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.realNameAuthentication!.tr, haveBack:true, backgroundColor: AppColors.mainColor), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.realNameAuthentication!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), body: Column( children: [ Container( width: 1.sw, // color: Colors.grey.shade300, - padding: EdgeInsets.only(left:25.h, right: 25.h, top: 25.h, bottom: 10.h), - child: Text(TranslationLoader.lanKeys!.buyRealNameTip!.tr) - ), + padding: EdgeInsets.only( + left: 25.h, right: 25.h, top: 25.h, bottom: 10.h), + child: Text( + TranslationLoader.lanKeys!.buyRealNameTip!.tr, + style: TextStyle( + color: AppColors.darkGrayTextColor, fontSize: 20.sp), + )), middleWidget(), bottomWidget() ], @@ -38,7 +45,7 @@ class _ValueAddedServicesRealNamePageState extends State[ - const SizedBox(width: 25), + SizedBox(width: 25), // Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white), // const SizedBox(width: 15), - Text("你好", style: const TextStyle(color: Colors.white, fontSize: _fontSize)), + Text("你好", + style: TextStyle( + color: Colors.white, fontSize: _fontSize.sp)), ], ), ), @@ -50,7 +51,7 @@ class JhPopMenus { } Widget menusView(dataArr) { - var cellH = dataArr.length * _cellHeight; + var cellH = dataArr.length * _cellHeight.h; var navH = JhScreenUtils.navigationBarHeight; return Positioned( right: 10, @@ -61,18 +62,27 @@ class JhPopMenus { Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5), ClipRRect( borderRadius: BorderRadius.circular(5), - child: Container(color: _bgColor, width: 160, height: cellH, child: buildMenuCell(dataArr)), + child: Container( + color: _bgColor, + width: 160, + height: cellH, + child: buildMenuCell(dataArr)), ) ], ), ); } - Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); + Navigator.of(context) + .push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); } /// 显示带线带背景 pop - static void showLinePop(BuildContext context, {bool isShowBg = false, Function(int selectIndex, String selectText)? clickCallback,}) { + static void showLinePop( + BuildContext context, { + bool isShowBg = false, + Function(int selectIndex, String selectText)? clickCallback, + }) { // 带线 Widget buildMenuLineCell(dataArr) { return ListView.separated( @@ -87,28 +97,36 @@ class JhPopMenus { clickCallback?.call(index, _listData[index]['text']); Navigator.pop(context); }, - child: Container( - height: _cellHeight, - padding: EdgeInsets.only(left: 20.h), + child: SizedBox( + height: _cellHeight.h, + // padding: EdgeInsets.only(left: 20.h), child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ // const SizedBox(width: 25), // Image.asset(dataArr[index]['icon'], width: _imgWH, height: _imgWH, color: Colors.white), // const SizedBox(width: 12), - Center(child: Text(dataArr[index]['text'], style: const TextStyle(color: Colors.white, fontSize: _fontSize))) + Center( + child: Text(dataArr[index]['text'], + style: TextStyle( + color: Colors.white, fontSize: _fontSize.sp))) ], ), ), ), ); }, - separatorBuilder: (context, index) => - const Divider(height: .1, indent: 50, endIndent: 0, color: Color(0xFFE6E6E6)), + separatorBuilder: (context, index) => Divider( + height: .1, + indent: 20.w, + endIndent: 20.w, + color: Color(0xFFE6E6E6)), ); } Widget menusView(dataArr) { - var cellH = dataArr.length * _cellHeight; + var cellH = dataArr.length * _cellHeight.h; var navH = JhScreenUtils.navigationBarHeight; if (isShowBg == true) { navH = navH - JhScreenUtils.topSafeHeight; @@ -124,7 +142,11 @@ class JhPopMenus { Image.asset('images/ic_menu_up_arrow.png', width: 28, height: 5), ClipRRect( borderRadius: BorderRadius.circular(5), - child: Container(color: _bgColor, width: 180.w, height: cellH, child: buildMenuLineCell(dataArr))) + child: Container( + color: _bgColor, + width: 180.w, + height: cellH, + child: buildMenuLineCell(dataArr))) ], ), ); @@ -140,7 +162,8 @@ class JhPopMenus { }, ); } else { - Navigator.of(context).push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); + Navigator.of(context) + .push(DialogRouter(_BasePopMenus(child: menusView(_listData)))); } } } @@ -148,7 +171,10 @@ class JhPopMenus { class _BasePopMenus extends Dialog { final child; - const _BasePopMenus({Key? key, this.child,}) : super(key: key); + const _BasePopMenus({ + Key? key, + this.child, + }) : super(key: key); @override Widget build(BuildContext context) { @@ -176,7 +202,8 @@ class DialogRouter extends PageRouteBuilder { barrierColor: Colors.white10.withAlpha(1), transitionDuration: const Duration(milliseconds: 150), pageBuilder: (context, animation, secondaryAnimation) => page, - transitionsBuilder: (context, animation, secondaryAnimation, child) => child, + transitionsBuilder: (context, animation, secondaryAnimation, child) => + child, ); } diff --git a/star_lock/lib/translations/lanKeyEntity.dart b/star_lock/lib/translations/lanKeyEntity.dart index 099ad663..db33e557 100644 --- a/star_lock/lib/translations/lanKeyEntity.dart +++ b/star_lock/lib/translations/lanKeyEntity.dart @@ -104,6 +104,8 @@ class LanKeyEntity { this.electricQuantity, this.lockName, this.lockGrouping, + this.selectGroup, + this.createNewGroup, this.adminOpenLockPassword, this.update, this.updateElectricQuantityTip, @@ -137,7 +139,8 @@ class LanKeyEntity { this.high, this.higher, this.burglarAlarmTip, - this.resetButtonTip, + this.resetButtonTip1, + this.resetButtonTip2, this.calibrationTime, this.setTheDSTMode, this.diagnoseTip, @@ -239,6 +242,7 @@ class LanKeyEntity { this.problemThree, this.pleaseEnterYourAnswer, this.aboutToExpire, + this.changeName, this.designation, this.state, this.wifiName, @@ -467,7 +471,8 @@ class LanKeyEntity { high = json['high']; higher = json['higher']; burglarAlarmTip = json['burglarAlarmTip']; - resetButtonTip = json['resetButtonTip']; + resetButtonTip1 = json['resetButtonTip1']; + resetButtonTip2 = json['resetButtonTip2']; calibrationTime = json['calibrationTime']; setTheDSTMode = json['setTheDSTMode']; diagnoseTip = json['diagnoseTip']; @@ -502,6 +507,8 @@ class LanKeyEntity { electricQuantity = json['electricQuantity']; lockName = json['lockName']; lockGrouping = json['lockGrouping']; + selectGroup = json['selectGroup']; + createNewGroup = json['createNewGroup']; adminOpenLockPassword = json['adminOpenLockPassword']; update = json['update']; updateElectricQuantityTip = json['updateElectricQuantityTip']; @@ -615,6 +622,7 @@ class LanKeyEntity { problemThree = json['problemThree']; pleaseEnterYourAnswer = json['pleaseEnterYourAnswer']; aboutToExpire = json['aboutToExpire']; + changeName = json['changeName']; designation = json['designation']; state = json['state']; @@ -858,7 +866,8 @@ class LanKeyEntity { String? high; String? higher; String? burglarAlarmTip; - String? resetButtonTip; + String? resetButtonTip1; + String? resetButtonTip2; String? calibrationTime; String? setTheDSTMode; String? diagnoseTip; @@ -961,6 +970,8 @@ class LanKeyEntity { String? authorizedAdmin; String? addAuthorizedAdmin; String? lockGroup; + String? selectGroup; + String? createNewGroup; String? transferSmartLock; String? selectiveLock; String? recipientInformation; @@ -1002,6 +1013,7 @@ class LanKeyEntity { String? problemThree; String? pleaseEnterYourAnswer; String? aboutToExpire; + String? changeName; String? designation; String? state; @@ -1241,7 +1253,8 @@ class LanKeyEntity { map['high'] = high; map['higher'] = higher; map['burglarAlarmTip'] = burglarAlarmTip; - map['resetButtonTip'] = resetButtonTip; + map['resetButtonTip1'] = resetButtonTip1; + map['resetButtonTip2'] = resetButtonTip2; map['calibrationTime'] = calibrationTime; map['setTheDSTMode'] = setTheDSTMode; map['diagnoseTip'] = diagnoseTip; @@ -1390,6 +1403,7 @@ class LanKeyEntity { map['problemThree'] = problemThree; map['pleaseEnterYourAnswer'] = pleaseEnterYourAnswer; map['aboutToExpire'] = aboutToExpire; + map['changeName'] = changeName; map['designation'] = designation; map['state'] = state;