Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
This commit is contained in:
commit
8f5a72b89f
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.star_lock">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@ -58,6 +58,27 @@
|
||||
<meta-data android:name="com.alibaba.app.appkey" android:value="333904040"/>
|
||||
<!-- 请填写你自己的appSecret -->
|
||||
<meta-data android:name="com.alibaba.app.appsecret" android:value="c316965fe0a74fc9a481a5c44a535dc2"/>
|
||||
<!-- 华为通道的参数appid -->
|
||||
<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=xxxxx"/>
|
||||
<!-- vivo通道的参数api_key为appkey -->
|
||||
<meta-data android:name="com.vivo.push.api_key" android:value=""/>
|
||||
<meta-data android:name="com.vivo.push.app_id" android:value=""/>
|
||||
<!-- honor通道的参数-->
|
||||
<meta-data android:name="com.hihonor.push.app_id" android:value=""/>
|
||||
<!-- oppo -->
|
||||
<meta-data android:name="com.oppo.push.key" android:value=""/>
|
||||
<meta-data android:name="com.oppo.push.secret" android:value=""/>
|
||||
<!-- 小米-->
|
||||
<meta-data android:name="com.xiaomi.push.id" android:value="id=2222222222222222222"/>
|
||||
<meta-data android:name="com.xiaomi.push.key" android:value="id=5555555555555"/>
|
||||
<!-- 魅族-->
|
||||
<meta-data android:name="com.meizu.push.id" android:value=""/>
|
||||
<meta-data android:name="com.meizu.push.key" android:value=""/>
|
||||
<!-- fcm -->
|
||||
<meta-data android:name="com.gcm.push.sendid" android:value="id=999999999999"/>
|
||||
<meta-data android:name="com.gcm.push.applicationid" android:value=""/>
|
||||
<meta-data android:name="com.gcm.push.projectid" android:value=""/>
|
||||
<meta-data android:name="com.gcm.push.api.key" android:value=""/>
|
||||
<!-- 消息接收监听器 (用户可自主扩展) -->
|
||||
<receiver android:name="cn.starlock.lock.MyMessageReceiver" android:exported="false">
|
||||
<!-- 为保证receiver安全,建议设置不可导出,如需对其他应用开放可通过android:permission进行限制 -->
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.star_lock"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application android:label="星锁" android:name="${applicationName}" android:icon="@mipmap/ic_logo">
|
||||
<!-- 请填写你自己的- appKey -->
|
||||
<meta-data android:name="com.alibaba.app.appkey" android:value="333904040"/>
|
||||
<!-- 请填写你自己的appSecret -->
|
||||
<meta-data android:name="com.alibaba.app.appsecret" android:value="c316965fe0a74fc9a481a5c44a535dc2"/>
|
||||
|
||||
<!-- 华为通道的参数appid -->
|
||||
<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=xxxxx" />
|
||||
|
||||
<!-- vivo通道的参数api_key为appkey -->
|
||||
<meta-data android:name="com.vivo.push.api_key" android:value="" />
|
||||
<meta-data android:name="com.vivo.push.app_id" android:value="" />
|
||||
|
||||
<!-- honor通道的参数-->
|
||||
<meta-data android:name="com.hihonor.push.app_id" android:value="" />
|
||||
|
||||
<!-- oppo -->
|
||||
<meta-data android:name="com.oppo.push.key" android:value="" />
|
||||
<meta-data android:name="com.oppo.push.secret" android:value="" />
|
||||
<!-- 小米-->
|
||||
<meta-data android:name="com.xiaomi.push.id" android:value="id=2222222222222222222" />
|
||||
<meta-data android:name="com.xiaomi.push.key" android:value="id=5555555555555" />
|
||||
|
||||
<!-- 魅族-->
|
||||
<meta-data android:name="com.meizu.push.id" android:value="" />
|
||||
<meta-data android:name="com.meizu.push.key" android:value="" />
|
||||
|
||||
<!-- fcm -->
|
||||
<meta-data android:name="com.gcm.push.sendid" android:value="id=999999999999" />
|
||||
<meta-data android:name="com.gcm.push.applicationid" android:value="" />
|
||||
<meta-data android:name="com.gcm.push.projectid" android:value="" />
|
||||
<meta-data android:name="com.gcm.push.api.key" android:value="" />
|
||||
|
||||
<!-- 消息接收监听器 (用户可自主扩展) -->
|
||||
<receiver
|
||||
android:name="cn.starlock.lock.MyMessageReceiver"
|
||||
android:exported="false" > <!-- 为保证receiver安全,建议设置不可导出,如需对其他应用开放可通过android:permission进行限制 -->
|
||||
<intent-filter>
|
||||
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -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:
|
||||
|
||||
BIN
star_lock/images/main/icon_lockDetail_rectangle.png
Normal file
BIN
star_lock/images/main/icon_lockDetail_rectangle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
star_lock/images/main/icon_main_attachment_ElectricCurtain.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_ElectricCurtain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
star_lock/images/main/icon_main_attachment_doorOpener.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_doorOpener.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
star_lock/images/main/icon_main_attachment_doorSensor.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_doorSensor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
star_lock/images/main/icon_main_attachment_lighting.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_lighting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
star_lock/images/main/icon_main_attachment_sensor.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_sensor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@ -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()))
|
||||
];
|
||||
}
|
||||
|
||||
@ -49,18 +49,26 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
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<StarLockLoginPage> {
|
||||
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<StarLockLoginPage> {
|
||||
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<StarLockLoginPage> {
|
||||
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<StarLockLoginPage> {
|
||||
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);
|
||||
},
|
||||
)
|
||||
],
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
@ -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<AccessoriesListPage> createState() => _AccessoriesListPageState();
|
||||
}
|
||||
|
||||
class _AccessoriesListPageState extends State<AccessoriesListPage>
|
||||
with BaseWidget {
|
||||
final logic = Get.put(AccessoriesListLogic());
|
||||
final state = Get.find<AccessoriesListLogic>().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),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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; //不同类型锁图片更换
|
||||
}
|
||||
@ -70,18 +70,18 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
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<ElectronicKeyDetailPage> {
|
||||
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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -421,28 +421,30 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
List<Widget> getAttachmentWidget() {
|
||||
var showWidgetArr = <Widget>[];
|
||||
// 无线键盘
|
||||
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;
|
||||
}
|
||||
|
||||
@ -79,31 +79,30 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
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<RealTimePicturePage>
|
||||
"images/main/icon_lockDetail_monitoringOpenVoice.png"))),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 60.w),
|
||||
SizedBox(width: 30.w),
|
||||
// 截图
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -178,7 +177,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
"images/main/icon_lockDetail_monitoringScreenshot.png")),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 60.w),
|
||||
SizedBox(width: 30.w),
|
||||
// 录制
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -191,10 +190,34 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
||||
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")),
|
||||
// ),
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@ -35,17 +34,21 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
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<DemoModeLockDetailPage> {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast("演示模式");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -18,7 +18,8 @@ class SelectLockTypePage extends StatefulWidget {
|
||||
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
|
||||
}
|
||||
|
||||
class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget {
|
||||
class _SelectLockTypePageState extends State<SelectLockTypePage>
|
||||
with BaseWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -80,6 +81,11 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||
getNearByLimits();
|
||||
}),
|
||||
lockTypeItem(
|
||||
'images/lockType/lockType_gatewayLock.png', '网络摄像头', () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||
getNearByLimits();
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -152,7 +152,7 @@ class _StarLockMinePageState extends State<StarLockMinePage> 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, () {
|
||||
|
||||
@ -53,7 +53,7 @@ class UdpHelp {
|
||||
}
|
||||
|
||||
void closeUDP() {
|
||||
if(udpHeartTimer != null){
|
||||
if (udpHeartTimer != null) {
|
||||
udpHeartTimer!.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user