diff --git a/star_lock/android/app/build.gradle b/star_lock/android/app/build.gradle index a37f1154..b880ece9 100644 --- a/star_lock/android/app/build.gradle +++ b/star_lock/android/app/build.gradle @@ -56,11 +56,13 @@ android { dev { dimension "flavor-type" applicationId "com.starlock.lock.dev" + signingConfig signingConfigs.pre resValue "string", "app_name", "星锁-dev" } pre { dimension "flavor-type" applicationId "com.starlock.lock.pre" + signingConfig signingConfigs.pre resValue "string", "app_name", "星锁" } sky { @@ -104,18 +106,13 @@ android { defaultConfig { - applicationId "cn.starlock.lock" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. -// minSdkVersion flutter.minSdkVersion -// targetSdkVersion flutter.targetSdkVersion minSdkVersion 25 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - signingConfig signingConfigs.sky - // 为减少体积,使用不同架构分包发布编译选项 flutter build apk --split-per-abi // 所以需要禁用ndk在同一个个包中包含多个架构 // 但是禁用NDK配置,又无法使用flutter run 命令了,因为编译完成它按照名称匹配找不到.apk包 @@ -133,19 +130,21 @@ android { universalApk true } } - }// /Users/sky/app-starlock/star_lock/android/app/sky.jks + } buildTypes { release { + // 高德地图导致release编译模式下应用闪退,根据:[高德地图在Debug模式下运行正常但是打Release包时则闪退解决办法](https://blog.csdn.net/weixin_39370093/article/details/109631210) + // 为release模式设置混淆可以解决地图闪退问题 + // 真实的解决办法 + minifyEnabled false + shrinkResources false productFlavors.dev.signingConfig signingConfigs.pre productFlavors.pre.signingConfig signingConfigs.pre productFlavors.sky.signingConfig signingConfigs.sky productFlavors.xhj.signingConfig signingConfigs.xhj } debug { - productFlavors.dev.signingConfig signingConfigs.pre - productFlavors.pre.signingConfig signingConfigs.pre - productFlavors.sky.signingConfig signingConfigs.sky - productFlavors.xhj.signingConfig signingConfigs.xhj + signingConfig signingConfigs.pre } } } diff --git a/star_lock/android/app/src/debug/AndroidManifest.xml b/star_lock/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index e38be3cb..00000000 --- a/star_lock/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/star_lock/android/app/src/main/AndroidManifest.xml b/star_lock/android/app/src/main/AndroidManifest.xml index de00346b..db10da2b 100644 --- a/star_lock/android/app/src/main/AndroidManifest.xml +++ b/star_lock/android/app/src/main/AndroidManifest.xml @@ -58,6 +58,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/star_lock/android/app/src/profile/AndroidManifest.xml b/star_lock/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 7b0b93a4..00000000 --- a/star_lock/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/star_lock/flavorizr.yaml b/star_lock/flavorizr.yaml index 9df16942..8515329a 100644 --- a/star_lock/flavorizr.yaml +++ b/star_lock/flavorizr.yaml @@ -57,6 +57,8 @@ flavors: icon: "assets/icon/dev.png" android: applicationId: "com.starlock.lock.dev" + customConfig: + signingConfig: signingConfigs.pre ios: bundleId: "com.starlock.lock.dev" pre: @@ -65,6 +67,8 @@ flavors: icon: "assets/icon/pre.png" android: applicationId: "com.starlock.lock.pre" + customConfig: + signingConfig: signingConfigs.pre ios: bundleId: "com.starlock.lock.pre" sky: diff --git a/star_lock/images/main/icon_lockDetail_rectangle.png b/star_lock/images/main/icon_lockDetail_rectangle.png new file mode 100644 index 00000000..df21718e Binary files /dev/null and b/star_lock/images/main/icon_lockDetail_rectangle.png differ diff --git a/star_lock/images/main/icon_main_attachment_ElectricCurtain.png b/star_lock/images/main/icon_main_attachment_ElectricCurtain.png new file mode 100644 index 00000000..a662ad60 Binary files /dev/null and b/star_lock/images/main/icon_main_attachment_ElectricCurtain.png differ diff --git a/star_lock/images/main/icon_main_attachment_doorOpener.png b/star_lock/images/main/icon_main_attachment_doorOpener.png new file mode 100644 index 00000000..74087c2b Binary files /dev/null and b/star_lock/images/main/icon_main_attachment_doorOpener.png differ diff --git a/star_lock/images/main/icon_main_attachment_doorSensor.png b/star_lock/images/main/icon_main_attachment_doorSensor.png new file mode 100644 index 00000000..d125e1f2 Binary files /dev/null and b/star_lock/images/main/icon_main_attachment_doorSensor.png differ diff --git a/star_lock/images/main/icon_main_attachment_lighting.png b/star_lock/images/main/icon_main_attachment_lighting.png new file mode 100644 index 00000000..571c0e56 Binary files /dev/null and b/star_lock/images/main/icon_main_attachment_lighting.png differ diff --git a/star_lock/images/main/icon_main_attachment_sensor.png b/star_lock/images/main/icon_main_attachment_sensor.png new file mode 100644 index 00000000..d97cbf70 Binary files /dev/null and b/star_lock/images/main/icon_main_attachment_sensor.png differ diff --git a/star_lock/lib/appRouters.dart b/star_lock/lib/appRouters.dart index c82faf0e..ca0e3630 100644 --- a/star_lock/lib/appRouters.dart +++ b/star_lock/lib/appRouters.dart @@ -1,6 +1,7 @@ import 'package:get/get.dart'; import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart'; import 'package:star_lock/login/register/starLock_register_binding.dart'; +import 'package:star_lock/main/accessoriesList/accessoriesList_page.dart'; import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_page.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord/keyOperationRecord_page.dart'; @@ -186,7 +187,7 @@ abstract class Routers { static const starLockMain = '/StarLockMain'; // 首页 static const starLockMinePage = '/StarLockMinePage'; // 我的 static const selectLockTypePage = '/SelectLockTypePage'; // 选择锁类型 - static const LockMallPage = '/LockMallPage'; // 商城页面 + static const lockMallPage = '/LockMallPage'; // 商城页面 static const addLockPage = '/AddLockPage'; // 选择锁类型 static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁 static const lockAddressPage = '/LockAddressPage'; // 锁地址 @@ -424,6 +425,8 @@ abstract class Routers { static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式 static const videoSlotPage = '/videoSlotPage'; //录像时段 static const liveVideoPage = '/liveVideoPage'; //实时画面 + + static const accessoriesListPage = '/accessoriesListPage'; //配件列表 } abstract class AppRouters { @@ -445,7 +448,7 @@ abstract class AppRouters { page: () => const SelectLockTypePage(), ), GetPage( - name: Routers.LockMallPage, + name: Routers.lockMallPage, page: () => const LockMallPage(), ), GetPage( @@ -1024,5 +1027,8 @@ abstract class AppRouters { GetPage( name: Routers.messageDetailPage, page: (() => const MessageDetailPage())), + GetPage( + name: Routers.accessoriesListPage, + page: (() => const AccessoriesListPage())) ]; } diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart index bad0e8b2..1f55f7f3 100644 --- a/star_lock/lib/login/login/starLock_login_page.dart +++ b/star_lock/lib/login/login/starLock_login_page.dart @@ -49,18 +49,26 @@ class _StarLockLoginPageState extends State { children: [ Container( padding: EdgeInsets.all(10.w), - child: Center(child: Image.asset('images/icon_main_1024.png', width: 110.w, height: 110.w))), + child: Center( + child: Image.asset('images/icon_main_1024.png', + width: 110.w, height: 110.w))), SizedBox(height: 50.w), LoginInput( controller: state.emailOrPhoneController, - onchangeAction: (v){ + onchangeAction: (v) { logic.checkNext(state.emailOrPhoneController); }, leftWidget: Padding( - padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/icon_login_account.png', width: 36.w, height: 36.w,), + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_account.png', + width: 36.w, + height: 36.w, + ), ), - hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + hintText: + TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number, inputFormatters: [ // FilteringTextInputFormatter.allow(RegExp('[0-9]')), @@ -69,15 +77,21 @@ class _StarLockLoginPageState extends State { SizedBox(height: 10.h), LoginInput( controller: state.pwdController, - onchangeAction: (v){ + onchangeAction: (v) { logic.checkNext(state.pwdController); }, isPwd: true, leftWidget: Padding( - padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/icon_login_password.png', width: 36.w, height: 36.w,), + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 36.w, + height: 36.w, + ), ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -86,41 +100,55 @@ class _StarLockLoginPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Obx(() => GestureDetector( - onTap: (){ + onTap: () { state.agree.value = !state.agree.value; logic.changeAgreeState(); }, - child: Image.asset(state.agree.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,) - )), - SizedBox(width: 15.w,), + child: Image.asset( + state.agree.value + ? 'images/icon_round_select.png' + : 'images/icon_round_unSelect.png', + width: 30.w, + height: 30.w, + ))), + SizedBox( + width: 15.w, + ), Flexible( child: RichText( text: TextSpan( text: TranslationLoader.lanKeys!.readAndAgree!.tr, - style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp), + style: TextStyle( + color: const Color(0xff333333), fontSize: 20.sp), children: [ WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》', style: TextStyle(color: AppColors.mainColor, fontSize: 20.sp)), + child: Text( + '《${TranslationLoader.lanKeys!.userAgreement!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, - arguments: { - "url": XSConstantMacro.userAgreementURL, - "title": '用户协议' - }); + Get.toNamed(Routers.webviewShowPage, arguments: { + "url": XSConstantMacro.userAgreementURL, + "title": '用户协议' + }); }, )), WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)), + child: Text( + '《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, - arguments: { - "url": XSConstantMacro.privacyPolicyURL, - "title": '隐私政策' - }); + Get.toNamed(Routers.webviewShowPage, arguments: { + "url": XSConstantMacro.privacyPolicyURL, + "title": '隐私政策' + }); }, )), ], @@ -135,10 +163,11 @@ class _StarLockLoginPageState extends State { borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), isDisabled: state.canNext.value, - onClick: state.canNext.value ? (){ - logic.login(); - }: null) - ), + onClick: state.canNext.value + ? () { + logic.login(); + } + : null)), SizedBox(height: 50.w), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -149,11 +178,34 @@ class _StarLockLoginPageState extends State { height: 50.h, // color: Colors.red, child: Center( - child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?', style: TextStyle(fontSize: 22.sp, color: AppColors.mainColor)), + child: Text( + '${TranslationLoader.lanKeys!.forgetPassword!.tr}?', + style: TextStyle( + fontSize: 22.sp, color: AppColors.mainColor)), ), ), onTap: () { - Navigator.pushNamed(context, Routers.starLockForgetPasswordPage); + Navigator.pushNamed( + context, Routers.starLockForgetPasswordPage); + }, + ), + Expanded( + child: SizedBox( + width: 10.sp, + )), + GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text('演示模式', + style: TextStyle( + fontSize: 22.sp, color: AppColors.mainColor)), + ), + ), + onTap: () { + Get.toNamed(Routers.demoModeLockDetailPage); }, ) ], diff --git a/star_lock/lib/main/accessoriesList/accessoriesList_logic.dart b/star_lock/lib/main/accessoriesList/accessoriesList_logic.dart index e69de29b..bd305363 100644 --- a/star_lock/lib/main/accessoriesList/accessoriesList_logic.dart +++ b/star_lock/lib/main/accessoriesList/accessoriesList_logic.dart @@ -0,0 +1,23 @@ +import 'package:star_lock/main/accessoriesList/accessoriesList_state.dart'; +import 'package:star_lock/tools/baseGetXController.dart'; + +class AccessoriesListLogic extends BaseGetXController { + final AccessoriesListState state = AccessoriesListState(); + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + } + + @override + void onInit() { + // TODO: implement onInit + super.onInit(); + } + + @override + void onClose() { + // TODO: implement onClose + } +} diff --git a/star_lock/lib/main/accessoriesList/accessoriesList_page.dart b/star_lock/lib/main/accessoriesList/accessoriesList_page.dart index e69de29b..347af63f 100644 --- a/star_lock/lib/main/accessoriesList/accessoriesList_page.dart +++ b/star_lock/lib/main/accessoriesList/accessoriesList_page.dart @@ -0,0 +1,76 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:star_lock/main/accessoriesList/accessoriesList_logic.dart'; + +import '../../../app_settings/app_colors.dart'; +import '../../../baseWidget.dart'; +import '../../../tools/titleAppBar.dart'; + +class AccessoriesListPage extends StatefulWidget { + const AccessoriesListPage({Key? key}) : super(key: key); + + @override + State createState() => _AccessoriesListPageState(); +} + +class _AccessoriesListPageState extends State + with BaseWidget { + final logic = Get.put(AccessoriesListLogic()); + final state = Get.find().state; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: TitleAppBar( + barTitle: '选择设备类型', + haveBack: true, + backgroundColor: AppColors.mainColor), + body: ListView( + children: [ + _accessoriesItem( + 'images/main/icon_main_attachment_lighting.png', "照明灯具", true), + _accessoriesItem( + 'images/main/icon_main_attachment_doorOpener.png', "开门器", false), + _accessoriesItem( + 'images/main/icon_main_attachment_ElectricCurtain.png', + "电动窗帘", + true), + _accessoriesItem('images/main/icon_main_attachment_doorSensor.png', + "门窗传感器", false), + _accessoriesItem( + 'images/main/icon_main_attachment_sensor.png', "传感器", true), + ], + ), + ); + } + + //配件列表 + Widget _accessoriesItem(String iconStr, String gatewayType, bool isWhite) { + return GestureDetector( + onTap: () { + logic.showToast("该功能暂未开放"); + }, + child: Container( + color: isWhite == true ? Colors.white : AppColors.mainBackgroundColor, + width: 1.sw, + height: 140.h, + padding: EdgeInsets.all(30.w), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + iconStr, + ), + SizedBox(width: 20.w), + Text( + gatewayType, + style: TextStyle(fontSize: 22.sp), + ) + ], + ), + ), + ); + } +} diff --git a/star_lock/lib/main/accessoriesList/accessoriesList_state.dart b/star_lock/lib/main/accessoriesList/accessoriesList_state.dart index e69de29b..b737db94 100644 --- a/star_lock/lib/main/accessoriesList/accessoriesList_state.dart +++ b/star_lock/lib/main/accessoriesList/accessoriesList_state.dart @@ -0,0 +1,6 @@ +import 'package:get/get.dart'; + +class AccessoriesListState { + var getLockType = 1.obs; //0-所有锁;1-门锁;2-NFC无源锁;3-挂锁;4-保险箱锁;5-车位锁;6-智能门禁;7-网关 + var lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs; //不同类型锁图片更换 +} diff --git a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart index 94705580..50d2553e 100644 --- a/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart +++ b/star_lock/lib/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetail/electronicKeyDetail_page.dart @@ -70,18 +70,18 @@ class _ElectronicKeyDetailPageState extends State { Obx(() => getPeriodValidityWidget()), Container(height: 10.h), CommonItem( - leftTitel: "接受账号", - rightTitle: state.itemData.value.username, + leftTitel: "接收者", + rightTitle: state.itemData.value.username ?? "", action: () {}), const SizedBox(height: 1), CommonItem( leftTitel: TranslationLoader.lanKeys!.sender!.tr, - rightTitle: state.itemData.value.senderUsername, + rightTitle: state.itemData.value.senderUsername ?? "", action: () {}), const SizedBox(height: 1), CommonItem( leftTitel: TranslationLoader.lanKeys!.senderTime!.tr, - rightTitle: getSenderDate(state.itemData.value), + rightTitle: getSenderDate(state.itemData.value) ?? "", action: () {}), Container(height: 10.h), CommonItem( @@ -157,12 +157,15 @@ class _ElectronicKeyDetailPageState extends State { rightTitle: '${state.beginTime.value}\n${state.endTime.value}', isHaveDirection: true, action: () async { - var data = await Get.toNamed(Routers.electronicKeyDetailChangeDate, arguments: {"itemData": state.itemData.value}); - if(data != null) { + var data = await Get.toNamed(Routers.electronicKeyDetailChangeDate, + arguments: {"itemData": state.itemData.value}); + if (data != null) { state.beginTimeTimestamp.value = data["beginTimeTimestamp"]; state.endTimeTimestamp.value = data["endTimeTimestamp"]; - state.beginTime.value = DateTool().dateToYMDHNString(state.beginTimeTimestamp.value.toString()); - state.endTime.value = DateTool().dateToYMDHNString(state.endTimeTimestamp.value.toString()); + state.beginTime.value = DateTool() + .dateToYMDHNString(state.beginTimeTimestamp.value.toString()); + state.endTime.value = DateTool() + .dateToYMDHNString(state.endTimeTimestamp.value.toString()); } }); } diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 11a4cdde..00570d8d 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -421,28 +421,30 @@ class _LockDetailPageState extends State List getAttachmentWidget() { var showWidgetArr = []; // 无线键盘 - if (state.isAttendance.value == 1) { - showWidgetArr.add(bottomItem( - 'images/main/icon_lockDetail_WirelessKeyboard.png', - '无线键盘', - state.bottomBtnisUneable.value, - () {})); - } - // 照明 - showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', - '照明', state.bottomBtnisUneable.value, () {})); + // if (state.isAttendance.value == 1) { + // showWidgetArr.add(bottomItem( + // 'images/main/icon_lockDetail_WirelessKeyboard.png', + // '无线键盘', + // state.bottomBtnisUneable.value, + // () {})); + // } + // // 照明 + // showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', + // '照明', state.bottomBtnisUneable.value, () {})); - // 照明 - showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', - '门磁', state.bottomBtnisUneable.value, () {})); + // // 照明 + // showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', + // '门磁', state.bottomBtnisUneable.value, () {})); - // 门磁 - showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', - '开门器', state.bottomBtnisUneable.value, () {})); + // // 门磁 + // showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png', + // '开门器', state.bottomBtnisUneable.value, () {})); // 新增配件 showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件', - state.bottomBtnisUneable.value, () {})); + state.bottomBtnisUneable.value, () { + Navigator.pushNamed(context, Routers.accessoriesListPage); + })); return showWidgetArr; } diff --git a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart index 08abd363..de16104c 100644 --- a/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart +++ b/star_lock/lib/main/lockDetail/realTimePicture/realTimePicture_page.dart @@ -79,31 +79,30 @@ class _RealTimePicturePageState extends State alignment: Alignment.center, children: [ Obx( - () => - state.listData.value.isEmpty || state.listData.value.length == 0 - ? Image.asset( - 'images/main/monitorBg.png', - width: ScreenUtil().screenWidth, - height: ScreenUtil().screenHeight, - fit: BoxFit.cover, - ) - : Builder( - builder: (BuildContext context) { - try { - return Image.memory( - state.listData.value, - gaplessPlayback: true, - width: 1.sw, - height: 1.sh, - fit: BoxFit.cover, - ); - } catch (e, stackTrace) { - print('Error loading image: $e'); - print('Stack trace: $stackTrace'); - return Container(); - } - }, - ), + () => state.listData.value.isEmpty || state.listData.value.isEmpty + ? Image.asset( + 'images/main/monitorBg.png', + width: ScreenUtil().screenWidth, + height: ScreenUtil().screenHeight, + fit: BoxFit.cover, + ) + : Builder( + builder: (BuildContext context) { + try { + return Image.memory( + state.listData.value, + gaplessPlayback: true, + width: 1.sw, + height: 1.sh, + fit: BoxFit.cover, + ); + } catch (e, stackTrace) { + print('Error loading image: $e'); + print('Stack trace: $stackTrace'); + return Container(); + } + }, + ), ), Obx(() => state.listData.value.isEmpty ? Positioned( @@ -161,7 +160,7 @@ class _RealTimePicturePageState extends State "images/main/icon_lockDetail_monitoringOpenVoice.png"))), ), ), - SizedBox(width: 60.w), + SizedBox(width: 30.w), // 截图 GestureDetector( onTap: () { @@ -178,7 +177,7 @@ class _RealTimePicturePageState extends State "images/main/icon_lockDetail_monitoringScreenshot.png")), ), ), - SizedBox(width: 60.w), + SizedBox(width: 30.w), // 录制 GestureDetector( onTap: () { @@ -191,10 +190,34 @@ class _RealTimePicturePageState extends State child: Image( width: 40.w, height: 40.w, + fit: BoxFit.fill, image: const AssetImage( "images/main/icon_lockDetail_monitoringScreenRecording.png")), ), ), + SizedBox(width: 30.w), + GestureDetector( + onTap: () { + logic.showToast('该功能暂未开放'); + }, + child: Image( + width: 28.w, + height: 28.w, + fit: BoxFit.fill, + image: + const AssetImage("images/main/icon_lockDetail_rectangle.png")) + // child: Container( + // width: 50.w, + // height: 50.w, + // padding: EdgeInsets.all(5.w), + // child: Image( + // width: 40.w, + // height: 40.w, + // fit: BoxFit.fill, + // image: const AssetImage( + // "images/main/icon_lockDetail_rectangle.png")), + // ), + ) ]); } diff --git a/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart b/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart index 4edc35e3..ef881d66 100644 --- a/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart +++ b/star_lock/lib/main/lockMian/demoMode/demoModeLockDetail/demoModeLockDetail_page.dart @@ -22,7 +22,6 @@ class _DemoModeLockDetailPageState extends State { @override void initState() { - // TODO: implement initState super.initState(); } @@ -35,17 +34,21 @@ class _DemoModeLockDetailPageState extends State { haveBack: true, backgroundColor: AppColors.mainColor, ), - body: Container( - width: 1.sw, - height: 1.sh - ScreenUtil().statusBarHeight * 2, - color: Colors.white, - child: Column( - children: [ - topTip(), - topWidget(), - Expanded(child: bottomWidget()) - ], - ), + body: ListView( + children: [ + Container( + width: 1.sw, + height: 1.sh - ScreenUtil().statusBarHeight, + color: Colors.white, + child: Column( + children: [ + topTip(), + topWidget(), + Expanded(child: bottomWidget()) + ], + ), + ), + ], )); } @@ -72,6 +75,7 @@ class _DemoModeLockDetailPageState extends State { Widget topWidget() { // KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0]; return Column( + mainAxisSize: MainAxisSize.min, children: [ SizedBox(height: 30.h), Stack( @@ -229,7 +233,8 @@ class _DemoModeLockDetailPageState extends State { showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys!.checkingIn!.tr, () { // gotoLogin(); - Get.toNamed(Routers.checkingInListPage, arguments: LockListInfoItemEntity()); + Get.toNamed(Routers.checkingInListPage, + arguments: LockListInfoItemEntity()); })); // } @@ -239,9 +244,8 @@ class _DemoModeLockDetailPageState extends State { TranslationLoader.lanKeys!.electronicKey!.tr, () { // gotoLogin(); - Get.toNamed(Routers.electronicKeyListPage, arguments: { - "keyInfo": LockListInfoItemEntity() - }); + Get.toNamed(Routers.electronicKeyListPage, + arguments: {"keyInfo": LockListInfoItemEntity()}); }), // 密码 @@ -249,9 +253,8 @@ class _DemoModeLockDetailPageState extends State { TranslationLoader.lanKeys!.password!.tr, () { // gotoLogin(); - Get.toNamed(Routers.passwordKeyListPage, arguments: { - "keyInfo": LockListInfoItemEntity() - }); + Get.toNamed(Routers.passwordKeyListPage, + arguments: {"keyInfo": LockListInfoItemEntity()}); }), // ic卡 @@ -259,8 +262,7 @@ class _DemoModeLockDetailPageState extends State { TranslationLoader.lanKeys!.card!.tr, () { // gotoLogin(); - Get.toNamed(Routers.cardListPage, - arguments: {"lockId": 0}); + Get.toNamed(Routers.cardListPage, arguments: {"lockId": 0}); }), // 指纹 @@ -313,9 +315,8 @@ class _DemoModeLockDetailPageState extends State { TranslationLoader.lanKeys!.authorizedAdmin!.tr, () { // gotoLogin(); - Get.toNamed(Routers.authorizedAdminListPage, arguments: { - "keyInfo": LockListInfoItemEntity() - }); + Get.toNamed(Routers.authorizedAdminListPage, + arguments: {"keyInfo": LockListInfoItemEntity()}); }), // 操作记录 bottomItem('images/main/icon_main_operatingRecord.png', @@ -330,7 +331,8 @@ class _DemoModeLockDetailPageState extends State { Get.toNamed(Routers.videoLogPage); }), // 消息提醒 - bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒", () { + bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒", + () { Get.toNamed(Routers.msgNotificationPage); }), // 设置 @@ -376,5 +378,4 @@ class _DemoModeLockDetailPageState extends State { // Get.toNamed(Routers.selectLockTypePage); logic.showToast("演示模式"); } - } diff --git a/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart b/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart index 1c7f2bf9..c3c22f9d 100644 --- a/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart +++ b/star_lock/lib/mine/addLock/selectLockType/selectLockType_page.dart @@ -18,7 +18,8 @@ class SelectLockTypePage extends StatefulWidget { State createState() => _SelectLockTypePageState(); } -class _SelectLockTypePageState extends State with BaseWidget { +class _SelectLockTypePageState extends State + with BaseWidget { @override Widget build(BuildContext context) { return Scaffold( @@ -80,6 +81,11 @@ class _SelectLockTypePageState extends State with BaseWidget // Navigator.pushNamed(context, Routers.gatewayListPage); getNearByLimits(); }), + lockTypeItem( + 'images/lockType/lockType_gatewayLock.png', '网络摄像头', () { + // Navigator.pushNamed(context, Routers.gatewayListPage); + getNearByLimits(); + }), ], ), ), diff --git a/star_lock/lib/mine/mine/starLockMine_page.dart b/star_lock/lib/mine/mine/starLockMine_page.dart index a71aeb41..34f423e4 100644 --- a/star_lock/lib/mine/mine/starLockMine_page.dart +++ b/star_lock/lib/mine/mine/starLockMine_page.dart @@ -152,7 +152,7 @@ class _StarLockMinePageState extends State with BaseWidget { mineItem('images/mine/icon_mine_main_shoppingcart.png', "配件商城".tr, () { Get.back(); - Get.toNamed(Routers.LockMallPage); + Get.toNamed(Routers.lockMallPage); }), mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, () { diff --git a/star_lock/lib/talk/udp/udp_help.dart b/star_lock/lib/talk/udp/udp_help.dart index f248d10b..74634efb 100644 --- a/star_lock/lib/talk/udp/udp_help.dart +++ b/star_lock/lib/talk/udp/udp_help.dart @@ -53,7 +53,7 @@ class UdpHelp { } void closeUDP() { - if(udpHeartTimer != null){ + if (udpHeartTimer != null) { udpHeartTimer!.cancel(); } } diff --git a/star_lock/lib/talk/udp/udp_talkClass.dart b/star_lock/lib/talk/udp/udp_talkClass.dart index 62a28123..8740a9e3 100644 --- a/star_lock/lib/talk/udp/udp_talkClass.dart +++ b/star_lock/lib/talk/udp/udp_talkClass.dart @@ -1,12 +1,8 @@ import 'dart:async'; import 'package:audioplayers/audioplayers.dart'; import 'package:fast_gbk/fast_gbk.dart'; -import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:star_lock/tools/eventBusEventManage.dart'; - import '../../appRouters.dart'; -import '../../main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart'; import '../../tools/storage.dart'; import 'udp_manage.dart'; diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml index ed8de82a..fe4dc2b9 100644 --- a/star_lock/pubspec.yaml +++ b/star_lock/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.11+20240305 +version: 1.0.11+20240306 environment: sdk: '>=2.12.0 <3.0.0'