Merge remote-tracking branch 'origin/master'

This commit is contained in:
葛佳祥 2024-03-19 18:28:52 +08:00
commit 32e6b7101c
48 changed files with 696 additions and 538 deletions

View File

@ -23,7 +23,7 @@ if (flutterVersionName == null) {
} }
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.aliyun.ams.emas-services' // emas-services插件 // apply plugin: 'com.aliyun.ams.emas-services' // emas-services插件
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
@ -114,7 +114,7 @@ android {
} }
defaultConfig { defaultConfig {
applicationId "com.skychip.lock"
// You can update the following values to match your application needs. // 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. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 25 minSdkVersion 25
@ -129,6 +129,18 @@ android {
//SO库架构so //SO库架构so
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64" abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64"
} }
manifestPlaceholders = [
JPUSH_PKGNAME : "com.skychip.lock",
//JPush Appkey.
JPUSH_APPKEY : "7ff37d174c1a568a89e98dad",
//.
JPUSH_CHANNEL : "flutter_channel",
//
XIAOMI_APPID : "MI-2882303761520287291",
XIAOMI_APPKEY : "MI-5352028744291",
]
splits { splits {
abi { abi {
enable true enable true
@ -140,6 +152,7 @@ android {
} }
} }
} }
buildTypes { buildTypes {
release { release {
// release编译模式下应用闪退[Debug模式下运行正常但是打Release包时则闪退解决办法](https://blog.csdn.net/weixin_39370093/article/details/109631210) // release编译模式下应用闪退[Debug模式下运行正常但是打Release包时则闪退解决办法](https://blog.csdn.net/weixin_39370093/article/details/109631210)
@ -163,7 +176,10 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation('com.amap.api:location:5.6.0') implementation('com.amap.api:location:5.6.0')
implementation('com.amap.api:3dmap:8.1.0') implementation('com.amap.api:3dmap:8.1.0')
implementation 'com.aliyun.ams:alicloud-android-push:3.8.7' // implementation 'com.aliyun.ams:alicloud-android-push:3.8.7'
// // //
implementation 'com.aliyun.ams:alicloud-android-third-push-xiaomi:3.8.7' // implementation 'com.aliyun.ams:alicloud-android-third-push-xiaomi:3.8.7'
// implementation 'cn.jiguang.sdk:jpush:4.0.9'
// implementation 'cn.jiguang.sdk:jcore:2.8.2'
// implementation 'cn.jiguang.sdk.plugin:xiaomi:4.0.9'//JPush版本号相同
} }

View File

@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.star_lock"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.example.star_lock">
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />--> <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />-->
@ -18,10 +18,6 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!--允许获取wifi状态改变用于网络定位无gps情况下的定位若需网络定位功能则必选--> <!--允许获取wifi状态改变用于网络定位无gps情况下的定位若需网络定位功能则必选-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<!--后台获取位置信息,若需后台定位则必选-->
<!-- <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />-->
<!--用于申请调用A-GPS模块,卫星定位加速-->
<!-- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />-->
<!--允许写设备缓存,用于问题排查--> <!--允许写设备缓存,用于问题排查-->
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<!--允许写入扩展存储,用于写入缓存定位数据--> <!--允许写入扩展存储,用于写入缓存定位数据-->
@ -35,7 +31,10 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.REORDER_TASKS"/> <uses-permission android:name="android.permission.REORDER_TASKS"/>
<application android:label="@string/app_name" android:name="${applicationName}" android:icon="@mipmap/ic_launcher"> <application android:label="@string/app_name" android:name="android.app.Application" android:icon="@mipmap/ic_launcher">
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- 配置定位Service --> <!-- 配置定位Service -->
<service android:name="com.amap.api.location.APSService"/> <service android:name="com.amap.api.location.APSService"/>
<activity android:name="com.skychip.lock.MainActivity" android:exported="true" android:screenOrientation="portrait" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <activity android:name="com.skychip.lock.MainActivity" android:exported="true" android:screenOrientation="portrait" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
@ -49,36 +48,7 @@
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2"/>
<meta-data android:name="com.amap.api.v2.apikey" android:value="11d49b3f4fc09c04a02bbb7500925ba2"></meta-data>
<!-- 请填写你自己的- appKey -->
<meta-data android:name="com.alibaba.app.appkey" android:value="334068743"/>
<!-- 请填写你自己的appSecret -->
<meta-data android:name="com.alibaba.app.appsecret" android:value="64de537f14984159a66ada10e54c6b63"/>
<!-- 华为通道的参数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=2882303761520287291"/>
<meta-data android:name="com.xiaomi.push.key" android:value="id=5352028744291"/>
<!-- 魅族-->
<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="com.skychip.lock.MyMessageReceiver" android:exported="false"> <receiver android:name="com.skychip.lock.MyMessageReceiver" android:exported="false">
<!-- 为保证receiver安全建议设置不可导出如需对其他应用开放可通过androidpermission进行限制 --> <!-- 为保证receiver安全建议设置不可导出如需对其他应用开放可通过androidpermission进行限制 -->
<intent-filter> <intent-filter>
@ -94,5 +64,48 @@
<action android:name="com.alibaba.sdk.android.push.RECEIVE"/> <action android:name="com.alibaba.sdk.android.push.RECEIVE"/>
</intent-filter> </intent-filter>
</receiver> </receiver>
<service
android:name="com.xiaomi.push.service.XMPushService"
android:process=":pushservice"
tools:replace="android:process">
</service>
<service
android:name="com.xiaomi.push.service.XMJobService"
android:process=":pushservice"
tools:replace="android:process">
</service>
<receiver
android:name="com.xiaomi.push.service.receivers.PingReceiver"
android:process=":pushservice"
tools:replace="android:process">
</receiver>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<!-- <receiver android:name="com.skychip.lock.JPushEventReceiver"-->
<!-- android:exported="true">-->
<!-- <intent-filter>-->
<!-- <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />-->
<!-- <category android:name="${applicationId}" />-->
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- &lt;!&ndash; Since JCore2.0.0 Required SDK核心功能&ndash;&gt;-->
<!-- &lt;!&ndash; 可配置android:process参数将Service放在其他进程中android:enabled属性不能是false &ndash;&gt;-->
<!-- &lt;!&ndash; 这个是自定义Service要继承极光JCommonService可以在更多手机平台上使得推送通道保持的更稳定 &ndash;&gt;-->
<!-- <service android:name=".JPushCustomService"-->
<!-- android:enabled="true"-->
<!-- android:exported="false"-->
<!-- android:process=":pushcore">-->
<!-- <intent-filter>-->
<!-- <action android:name="cn.jiguang.user.service.action" />-->
<!-- </intent-filter>-->
<!-- </service>-->
</application> </application>
</manifest> </manifest>

View File

@ -16,9 +16,7 @@ import com.alibaba.sdk.android.push.register.MiPushRegister
class MainActivity: FlutterActivity() { class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
initAliyunPushService() // initJPushService()
MiPushRegister.register(applicationContext, "2882303761520287291", "5352028744291");
GeneratedPluginRegistrant.registerWith(flutterEngine!!) GeneratedPluginRegistrant.registerWith(flutterEngine!!)
MethodChannel(flutterEngine?.dartExecutor!!.binaryMessenger, "starLockFlutterSend").setMethodCallHandler { call, result -> MethodChannel(flutterEngine?.dartExecutor!!.binaryMessenger, "starLockFlutterSend").setMethodCallHandler { call, result ->
@ -63,23 +61,6 @@ class MainActivity: FlutterActivity() {
startActivity(Intent.createChooser(shareIntent, null)) startActivity(Intent.createChooser(shareIntent, null))
} }
private fun initAliyunPushService() {
PushServiceFactory.init(applicationContext)
val pushService = PushServiceFactory.getCloudPushService()
val callback = object : CommonCallback, com.alibaba.sdk.android.push.CommonCallback {
override fun onSuccess(response: String?) {
Log.e("TAG","success $response")
}
override fun onFailed(errorCode: String?, errorMessage: String?) {
Log.e("TAG","error $errorMessage")
}
}
pushService.register(applicationContext,callback)
}
override fun configureFlutterEngine(flutterEngine: FlutterEngine) { override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine); GeneratedPluginRegistrant.registerWith(flutterEngine);
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "starLockFlutterSend").setMethodCallHandler { MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "starLockFlutterSend").setMethodCallHandler {

View File

@ -4,16 +4,17 @@ buildscript {
google() google()
mavenCentral() mavenCentral()
mavenLocal() mavenLocal()
maven { // Maven仓库地址 // maven { // Maven仓库地址
url 'https://maven.aliyun.com/nexus/content/repositories/releases/' // url 'https://maven.aliyun.com/nexus/content/repositories/releases/'
} // }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.2' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// emas-services插件 // emas-services插件
classpath 'com.aliyun.ams:emas-services:1.0.4' // classpath 'com.aliyun.ams:emas-services:1.0.4'
// classpath "cn.jiguang.sdk:jpush:4.0.9"
} }
} }
@ -21,11 +22,11 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
google() google()
// mavenCentral() mavenCentral()
jcenter() jcenter()
maven { // Maven仓库地址 // maven { // Maven仓库地址
url 'https://maven.aliyun.com/nexus/content/repositories/releases/' // url 'https://maven.aliyun.com/nexus/content/repositories/releases/'
} // }
} }
} }

View File

@ -36,6 +36,7 @@ end
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/aliyun/aliyun-specs.git' source 'https://github.com/aliyun/aliyun-specs.git'
pod 'AlicloudPush', '~> 1.9.9' pod 'AlicloudPush', '~> 1.9.9'
pod 'JPush'
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|

View File

@ -5,23 +5,23 @@
<key>config</key> <key>config</key>
<dict> <dict>
<key>emas.appKey</key> <key>emas.appKey</key>
<string>333904046</string> <string>334068745</string>
<key>emas.appSecret</key> <key>emas.appSecret</key>
<string>3eead09a7fc7416cb4082319aa6f48c6</string> <string>bee9c200835e4951a85dc8709c319560</string>
<key>emas.bundleId</key> <key>emas.bundleId</key>
<string>cn.star-lock.starLock</string> <string>cn.star-lock.starLock</string>
<key>hotfix.idSecret</key> <key>hotfix.idSecret</key>
<string>333904046-2</string> <string>334068745-2</string>
<key>hotfix.rsaSecret</key> <key>hotfix.rsaSecret</key>
<string>MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCS0i6gEzmEoaXFe0gDcur1sdkE2ecWXRay3h+O11F0FmoNfQx+V4i+pt2se+KDAx/GQq8Axj4DnjzE4KT0TeVmrutI1FF4h2Tv5Ge9KT0yuCayiQPW5gkqTDxaehkRDyCzGkwaLkVslN2kFqammWsODTQw2a0/lziMrNpQU8bnjjYbKS1eIQUPM9s6smwN2A4RErAP7X1knsT1tCHoCgfgjZf1nddQSMw4vy9FBpKZDYD1gjdo5+U93VopVLpMqcbOVXbQeUwpArURNnY/dbSkrGsC2TXAfaYa+sVXPchy0pZ7C2wU2/6INkFBpw2QjFQ4uAcNXwoEn5x5iBw4VbnPAgMBAAECggEAfoowLT7kf+9iFIZgVrig0QlrZcb4aEnq2lafFFl3lnoLBX0VW37OGKNwwswzOX9jz1iBxEUYBb5H2ddT1Euev5Vaq/ZyEVOAJ1HQJzR3zlLw50c3y+uPUqlKCyDYod9L65FqrdXbd+4F6Pqsv0HTBtVSehfiPcBzuKrxrfHGqKKWx4C620SxPqtpNaYXaENyqfZ3qyKw+xtWGJtxjQ8DFkeWJ1C8O7ZxJ33SpwpEb9UIJpDtPcaKbwccLn/w5214kYAqE7m5aTmLUTFRYay2Hez1gPUKVirt/QDfEfHRv6xbv5jePl0snXWK0VwgoR3hLDuF9etM3UFLr40eQNICQQKBgQDCBjM7NvscgRCJ7E8vdcfxlebUhooZUewc9gBsTpPMcS8xZXP8desc1smZvokPtIKKwPdECw6rGf1a+sb6dnHMNjWBUbHTxWnYKqVlDDXJkgcSynK+74wRCfzmFamtQmJ1qVATHRVLoVSzmCwn9q+HsGWLAsMXDu5qbL6B91La2QKBgQDBuBHfPo4AwqefsPn5isw0bFYuc5rGSbfRTAlOC09BDJb2E9bz8QiC0A/Ar8i2fx9UbHKj96NYwMGwS49Bu/Behq5v2TnODbA6j5lN4fMbRBaCMs4TINUjG4xGeFehELiFIJvCJ+3z6zRBuXmCkxtso3VM6uVSn8TX1gjBgzxA5wKBgHjJYVVoyfUZyBEE4tr56OpV1qjRxOE0Zdg1sVe7pzkr8SRAM2+kfSSr9j9XJX54cpgsvwJGG/CasmXUHtFHsVpfGPoTwK/EgzsGeYapjkaZOPwSulJxUHI/FIisTcBFxoPXTrlHbr1xhwhzIHIUmXvQbbaXlpohOn1Yi1Tfgl4pAoGAJBdZLRCIgFfDxxq/1+AmH3Y3sDvVkC/X0WSrLyEoSORBk+MqXxR/E3AUH0Ag0u9oNOBnk2jlw/lVnLTXIdYT+Gh7Q1djT6J5PM/YLgx0sJXE48j3X9T0ILBXOCHfoaBt4E+s9UVfLdyaRcx6ePtTVrA1gHka9IPTtqqnwvXiWe0CgYBjmKSq2uBXSzAWMAR5KbUYDzUoqWGGHyRHtX4IqlLYF6paabzJDxPg2QScv9e8+js5Vmbg/G5RUPhYMqJIatAzLQDujaLovLGPXlx2xQXf4Nn0M5AnvKXMF+m8xBY5KnT5SWjI9Uq9QVJMcMl43Nq1V4NSsnB8SIZsGVOgxB9tuw==</string> <string>MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCuBisIWHUAiWQHltp/eHdK/sBfC1Pk8XBhziYIFWfZTVWR8QnLUbefnXJcW0C2nHzVRKv9LtbO/hWpz8IoZUisJsi5FmEwFCXf0cSMkaOI0wD7rpFmXVuMuSBJvPhvdT9lKzNx6rLaLRNdz2v/4Iat0Fphmqe6VqnHOnn9NBKzmg2NStW5U1rpxH+SovHTpX9aphHrXjJzkpmxJC0VDK3vZTUZANIiR0WQVGXChzGeEctILEqQ/4K5hwUrs3jFF1k4Qr/RyjzBMGw0HSDCA4nuasYSPDCv7phScqmn52/cUTXxY9BfGFvyvLIPC7FgD1tGOmrYeJJU3GleEJ+Y1uuRAgMBAAECggEAcXf8HxjuUUdEPd6S4YK+5dttu4s7TJBQ4rTz/1lVuU6/eMVdyYCi5iRXKPknHOq0SqrYKeGclqL9pReeVZCU7grr3iNFg3/foiy4p59erhxHC9QrYj+FLiCXeP0KUEJ275RXmvOZYsD5W7WfidvwdOzhwbqBmvJfCVSLrhmCCDBYIleLnmELai63jTTxy1ICKv/hnFMm04nyrO6tsR4La0nWXWC5VGZRk3O0eVTi1DyN0l0FO2zy2KJewTVaTGUDGDKuXUdZWltzsM6zOXvfLbSBkzJrfPeJzYKnoyVSMNUfq8yR7fMIWXxo2G/Li1JoUEzBt+3ilPdxIWWOiXY7QQKBgQD1/G7Egp9R1UMHe9Gaxa/lwjz6k2fv+08pRrVHUs0sdI4BjsIp1syLYUQjMqbH7rJrV2qTLFvpaUkQqBPkvmNcbEWeDk4UdFN/bFU+7F9C17CxBb9D54ZxTLOFmvNobnPHJXyKpBCLCycjWa2CIMSjuPKqkDn5TN9d+Q7WvogQ/QKBgQC1G8bfNvZ/uiCZWcSrYTuo5uDIxEWC6jpwitLPCvROQyRy+cBg5sOEFoqX11nbn7RJ1CzoG5wb1QPxkbaP3ryFgA/5xON4r9m/3yF08bVJpLYbzub+kTmlo2YDsHkc+7U4J5XoF0Jwwr+A1CIJahpD78l58h9uMRLKZqsV8teDJQKBgEBzEkaUfs+/E5/bVjC6CPsm6Dky8/GRo80JxKdaT32NUEOiNscli1QdeO/L7pzFsqOjNL44yiAewNEHaKbvJzNo/tiJoPWFAPeK187zuYXW42mOOu28tKHs2cBwt8Ot5NHRxY7Bq7/yfR+q+GX21e6bn6EGxtnFxWRmw/eJ1ja1AoGASDCRPeo/qTv8wIOatCFm0XVuBjjN6FgLAU8kpmicZxG2Vqoct8NkDaOajNnHNJbdG0yatc5DlIh9MO4/Eevbw27/bzS+4x1dM3DyehXaiEdCW6VGSBSFIPQXtsLCE/51BrQoucGDt0S5ZtWn147Wd1v+OEB9rMOc1NbFvVL1+o0CgYEApnA58wOgtxJGggaa4LS6T+VTsx73mzz3YP8AAHsgePeFCqS/MdDwaoLlAKBRkDm07KkaRh0/Nofn3jSRs7zlFHSOUmhsAI0htEQx1x4f3MoBIuDtozv/eMT/XbGrNsP2i696TN39stnczrV3ZD7jzFvveEHRARaF4MvuLcRBrdQ=</string>
<key>httpdns.accountId</key> <key>httpdns.accountId</key>
<string>125761</string> <string>100674</string>
<key>httpdns.secretKey</key> <key>httpdns.secretKey</key>
<string>f77f39c6f0e66d7c169aa7e8d87dfe13</string> <string>6cd4984095d53f6f311424cc9299257b</string>
<key>appmonitor.tlog.rsaSecret</key> <key>appmonitor.tlog.rsaSecret</key>
<string>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSlqdpwcdPniL1ahrYfTy47aD8Ay7D7qLyKO5QeXy64V+CQ0UvYwyTtfPRzvlXbwmc2ONjwKHq2B7SRhwHuBwURZNp5Iw1XaGCmqPPMOpL9UnYEIO90x3sFebIRHmXscyRVniGhmmdOXpVaP6BA3RWK1uwH/FBetzom6H+dcNMPQIDAQAB</string> <string>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCku9yUXBjd9m7V8fflC6XTwJEc8D8GSe5KzgXQZXk12S3KaZrx82Cu6/nOD7RNtZvsxrYd69bzkrG84tvIwwVSefWuPiDAiY2uiigpSXXda0FjQXZ0xHPJGcsrbI67y/2xFeK0pD9542Y4FBYPq6BcslAYFUVFD8bN+K/GBXkJRwIDAQAB</string>
<key>appmonitor.rsaSecret</key> <key>appmonitor.rsaSecret</key>
<string>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSlqdpwcdPniL1ahrYfTy47aD8Ay7D7qLyKO5QeXy64V+CQ0UvYwyTtfPRzvlXbwmc2ONjwKHq2B7SRhwHuBwURZNp5Iw1XaGCmqPPMOpL9UnYEIO90x3sFebIRHmXscyRVniGhmmdOXpVaP6BA3RWK1uwH/FBetzom6H+dcNMPQIDAQAB</string> <string>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCku9yUXBjd9m7V8fflC6XTwJEc8D8GSe5KzgXQZXk12S3KaZrx82Cu6/nOD7RNtZvsxrYd69bzkrG84tvIwwVSefWuPiDAiY2uiigpSXXda0FjQXZ0xHPJGcsrbI67y/2xFeK0pD9542Y4FBYPq6BcslAYFUVFD8bN+K/GBXkJRwIDAQAB</string>
</dict> </dict>
<key>services</key> <key>services</key>
<dict> <dict>
@ -65,7 +65,7 @@
<key>status</key> <key>status</key>
<integer>1</integer> <integer>1</integer>
<key>version</key> <key>version</key>
<string>1.2.0</string> <string>1.2.0-no-memory</string>
</dict> </dict>
<key>man_service</key> <key>man_service</key>
<dict> <dict>
@ -79,7 +79,7 @@
<key>status</key> <key>status</key>
<integer>1</integer> <integer>1</integer>
<key>version</key> <key>version</key>
<string>2.0.4</string> <string>1.9.9.1-notnull</string>
</dict> </dict>
</dict> </dict>
</dict> </dict>

View File

@ -9,9 +9,14 @@
#import <AudioToolbox/AudioToolbox.h> #import <AudioToolbox/AudioToolbox.h>
#import <CloudPushSDK/CloudPushSDK.h> #import <CloudPushSDK/CloudPushSDK.h>
#import "JPUSHService.h"
#import <UserNotifications/UserNotifications.h>
#import "JPUSHService.h"
#import <UserNotifications/UserNotifications.h>
@interface AppDelegate : FlutterAppDelegate <UIApplicationDelegate> @interface AppDelegate : FlutterAppDelegate <UIApplicationDelegate, JPUSHRegisterDelegate>
@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) UIWindow *window;

View File

@ -7,6 +7,7 @@
#import <UserNotifications/UserNotifications.h> #import <UserNotifications/UserNotifications.h>
@interface AppDelegate() @interface AppDelegate()
@end @end
@ -18,6 +19,18 @@
- (BOOL)application:(UIApplication *)application - (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// //
// JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
// entity.types = JPAuthorizationOptionAlert|JPAuthorizationOptionBadge|JPAuthorizationOptionSound|JPAuthorizationOptionProvidesAppNotificationSettings;
// [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
//
// //sdk
// // notice: 2.1.5 SDK IDFA使 IDFA nil
// [JPUSHService setupWithOption:launchOptions appKey:@"7ff37d174c1a568a89e98dad"
// channel:@"flutter_channel"
// apsForProduction:NO
// advertisingIdentifier:nil];
// [self initCloudPush]; // [self initCloudPush];
// [CloudPushSDK sendNotificationAck:launchOptions]; // [CloudPushSDK sendNotificationAck:launchOptions];
XSFlutterManager *VC = [[XSFlutterManager alloc] init]; XSFlutterManager *VC = [[XSFlutterManager alloc] init];
@ -29,7 +42,7 @@
- (void)initCloudPush { - (void)initCloudPush {
// SDK // SDK
[CloudPushSDK asyncInit:@"333904046" appSecret:@"3eead09a7fc7416cb4082319aa6f48c6" callback:^(CloudPushCallbackResult *res) { [CloudPushSDK asyncInit:@"334068745" appSecret:@"bee9c200835e4951a85dc8709c319560" callback:^(CloudPushCallbackResult *res) {
if (res.success) { if (res.success) {
NSLog(@"Push SDK init success, deviceId: %@.", [CloudPushSDK getDeviceId]); NSLog(@"Push SDK init success, deviceId: %@.", [CloudPushSDK getDeviceId]);
} else { } else {
@ -62,13 +75,16 @@
* deviceTokenCloudPush * deviceTokenCloudPush
*/ */
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[CloudPushSDK registerDevice:deviceToken withCallback:^(CloudPushCallbackResult *res) { // [CloudPushSDK registerDevice:deviceToken withCallback:^(CloudPushCallbackResult *res) {
if (res.success) { // if (res.success) {
NSLog(@"Register deviceToken success."); // NSLog(@"Register deviceToken success.");
} else { // } else {
NSLog(@"Register deviceToken failed, error: %@", res.error); // NSLog(@"Register deviceToken failed, error: %@", res.error);
} // }
}]; // }];
//sdkDeviceToken
[JPUSHService registerDeviceToken:deviceToken];
} }
/* /*
* *
@ -98,12 +114,6 @@
NSLog(@"Receive message title: %@, content: %@.", title, body); NSLog(@"Receive message title: %@, content: %@.", title, body);
} }
//- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// // App
// // [CloudPushSDK handleLaunching:launchOptions];(Deprecated from v1.8.1)
// [CloudPushSDK sendNotificationAck:launchOptions];
// return YES;
//}
/* /*
* App * App
*/ */

View File

@ -1,82 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>$(BUNDLE_DISPLAY_NAME)</string> <string>$(BUNDLE_DISPLAY_NAME)</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>$(BUNDLE_NAME)</string> <string>$(BUNDLE_NAME)</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string> <string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
</dict> </dict>
<key>NSBluetoothAlwaysUsageDescription</key> <key>NSBluetoothAlwaysUsageDescription</key>
<string>The app uses bluetooth to find, connect and transfer data between different devices</string> <string>The app uses bluetooth to find, connect and transfer data between different devices</string>
<key>NSBluetoothPeripheralUsageDescription</key> <key>NSBluetoothPeripheralUsageDescription</key>
<string>The app uses bluetooth to find, connect and transfer data between different devices</string> <string>The app uses bluetooth to find, connect and transfer data between different devices</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>照片</string> <string>照片</string>
<key>NSContactsUsageDescription</key> <key>NSContactsUsageDescription</key>
<string>Reason we need access to the contact list</string> <string>Reason we need access to the contact list</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>应用在前台和后台的时候可以搜到更新的位置信息</string> <string>应用在前台和后台的时候可以搜到更新的位置信息</string>
<key>NSLocationAlwaysUsageDescription</key> <key>NSLocationAlwaysUsageDescription</key>
<string>应用在后台的时候可以搜到更新的位置信息</string> <string>应用在后台的时候可以搜到更新的位置信息</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>应用在前台的时候可以搜到更新的位置信息</string> <string>应用在前台的时候可以搜到更新的位置信息</string>
<key>NSMicrophoneUsageDescription</key> <key>NSMicrophoneUsageDescription</key>
<string>应用请求麦克风用来通话</string> <string>应用请求麦克风用来通话</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>用于相册</string> <string>用于相册</string>
<key>UIApplicationSceneManifest</key> <key>UIApplicationSceneManifest</key>
<dict> <dict>
<key>UISceneConfigurations</key> <key>UISceneConfigurations</key>
<dict/> <dict/>
</dict> </dict>
<key>UIApplicationSupportsIndirectInputEvents</key> <key>UIApplicationSupportsIndirectInputEvents</key>
<true/> <true/>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>remote-notification</string> <string>remote-notification</string>
</array> </array>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>Main</string> <string>Main</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
</array> </array>
<key>UISupportedInterfaceOrientations~ipad</key> <key>UISupportedInterfaceOrientations~ipad</key>
<array> <array>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>io.flutter.embedded_views_preview</key> <key>NSUserTrackingUsageDescription</key>
<true/> <string>需要访问您的隐私数据,以提供个性化的体验。</string>
</dict> <key>io.flutter.embedded_views_preview</key>
</plist> <true/>
</dict>
</plist>

View File

@ -1,15 +1,16 @@
import 'package:aliyun_push/aliyun_push.dart'; // import 'package:aliyun_push/aliyun_push.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/flavors.dart'; import 'package:star_lock/flavors.dart';
import 'package:star_lock/tools/app_manager.dart'; import 'package:star_lock/tools/app_manager.dart';
import 'package:star_lock/tools/bindings/app_binding.dart'; import 'package:star_lock/tools/bindings/app_binding.dart';
import 'package:star_lock/tools/storage.dart'; // import 'package:star_lock/tools/storage.dart';
import 'package:star_lock/tools/xs_aliyunPush.dart'; // import 'package:star_lock/tools/xs_aliyunPush.dart';
import 'package:star_lock/translations/app_dept.dart'; import 'package:star_lock/translations/app_dept.dart';
import 'package:star_lock/translations/trans_lib.dart'; import 'package:star_lock/translations/trans_lib.dart';
@ -30,6 +31,8 @@ class MyApp extends StatefulWidget {
// final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>(); // final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget { class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
final JPush jpush = JPush();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ScreenUtilInit( return ScreenUtilInit(
@ -101,7 +104,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
initFlutterAliyunPush(); initJPushService();
} }
@override @override
@ -109,6 +112,24 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
WidgetsBinding.instance.removeObserver(this); WidgetsBinding.instance.removeObserver(this);
super.dispose(); super.dispose();
} }
Future<void> initJPushService() async {
jpush.setup(
appKey: "7ff37d174c1a568a89e98dad",
channel: "flutter_channel",
production: false,
debug: true,
);
jpush.applyPushAuthority(
const NotificationSettingsIOS(sound: true, alert: true, badge: true));
// jpush.setChannelAndSound(
// channel: "flutter_channel", channelID: "115700", sound: "default");
// Platform messages may fail, so we use a try/catch PlatformException.
jpush.getRegistrationID().then((rid) {
print("flutter get registration id : $rid");
});
}
} }
void openBlueScan() { void openBlueScan() {
@ -146,26 +167,3 @@ Future<bool> getMicrophonePermission() async {
} }
return false; return false;
} }
//
Future<void> initFlutterAliyunPush() async {
final data = await Storage.getString(saveUserLoginData);
if (data != null) {
final aliyunPush = AliyunPush();
XSAliyunPushProvider().init(aliyunPush);
XSAliyunPushProvider().initAliyunPush();
if (Platform.isAndroid) {
XSAliyunPushProvider().initAliyunThirdPush();
}
//使DeviceID推送
aliyunPush.getDeviceId().then((deviceId) async {
print('得到的DeviceId$deviceId');
if (deviceId.isNotEmpty) {
XSAliyunPushProvider()
.pushBindDeviceID(deviceId, Platform.isAndroid ? 10 : 20);
}
});
}
}

View File

@ -88,7 +88,7 @@ class _StarLockForgetPasswordPageState
height: 0.5.h, height: 0.5.h,
color: Colors.grey, color: Colors.grey,
), ),
LoginInput( LoginInput().tfInput(
controller: state.phoneController, controller: state.phoneController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.phoneController); logic.checkNext(state.phoneController);
@ -107,7 +107,7 @@ class _StarLockForgetPasswordPageState
LengthLimitingTextInputFormatter(30), LengthLimitingTextInputFormatter(30),
]), ]),
SizedBox(height: 10.h), SizedBox(height: 10.h),
LoginInput( LoginInput().tfInput(
controller: state.pwdController, controller: state.pwdController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.pwdController); logic.checkNext(state.pwdController);
@ -134,7 +134,7 @@ class _StarLockForgetPasswordPageState
color: AppColors.placeholderTextColor, fontSize: 20.sp), color: AppColors.placeholderTextColor, fontSize: 20.sp),
), ),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput().tfInput(
controller: state.sureController, controller: state.sureController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.sureController); logic.checkNext(state.sureController);
@ -158,7 +158,7 @@ class _StarLockForgetPasswordPageState
Row( Row(
children: [ children: [
Expanded( Expanded(
child: LoginInput( child: LoginInput().tfInput(
controller: state.codeController, controller: state.codeController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.codeController); logic.checkNext(state.codeController);

View File

@ -1,11 +1,8 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart'; import 'package:star_lock/flavors.dart';
import 'package:star_lock/tools/appFirstEnterHandle.dart';
import 'package:star_lock/tools/storage.dart';
import '../../appRouters.dart'; import '../../appRouters.dart';
import '../../app_settings/app_colors.dart'; import '../../app_settings/app_colors.dart';
@ -57,42 +54,34 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
child: Image.asset('images/icon_main_1024.png', child: Image.asset('images/icon_main_1024.png',
width: 110.w, height: 110.w))), width: 110.w, height: 110.w))),
SizedBox(height: 50.w), SizedBox(height: 50.w),
LoginInput( LoginInput().tfInput(
controller: state.emailOrPhoneController, controller: state.emailOrPhoneController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.emailOrPhoneController); logic.checkNext(state.emailOrPhoneController);
}, },
leftWidget: Padding( leftWidget: Image.asset(
padding: EdgeInsets.only( 'images/icon_login_account.png',
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), width: 36.w,
child: Image.asset( height: 36.w,
'images/icon_login_account.png',
width: 36.w,
height: 36.w,
),
), ),
hintText: hintText:
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
inputFormatters: [ inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp('[0-9]')), // FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(30), LengthLimitingTextInputFormatter(30),
]), ]),
SizedBox(height: 10.h), SizedBox(height: 10.h),
LoginInput( LoginInput().tfInput(
controller: state.pwdController, controller: state.pwdController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.pwdController); logic.checkNext(state.pwdController);
}, },
isPwd: true, isPwd: true,
leftWidget: Padding( leftWidget: Image.asset(
padding: EdgeInsets.only( 'images/icon_login_password.png',
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), width: 36.w,
child: Image.asset( height: 36.w,
'images/icon_login_password.png',
width: 36.w,
height: 36.w,
),
), ),
hintText: hintText:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",

View File

@ -13,6 +13,9 @@ class StarLockLoginState {
TextEditingController emailOrPhoneController = TextEditingController(); TextEditingController emailOrPhoneController = TextEditingController();
TextEditingController pwdController = TextEditingController(); TextEditingController pwdController = TextEditingController();
late FocusNode myFocusNode1;
late FocusNode myFocusNode2;
StarLockLoginState() { StarLockLoginState() {
// emailOrPhone.value = StoreService.to.getLastUserAccount() as String; // emailOrPhone.value = StoreService.to.getLastUserAccount() as String;
emailOrPhoneController.text = emailOrPhone.value; emailOrPhoneController.text = emailOrPhone.value;

View File

@ -196,7 +196,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
Widget middleTFWidget() { Widget middleTFWidget() {
return Column( return Column(
children: [ children: [
LoginInput( LoginInput().tfInput(
controller: state.phoneOrEmailController, controller: state.phoneOrEmailController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.phoneOrEmailController); logic.checkNext(state.phoneOrEmailController);
@ -218,7 +218,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
LengthLimitingTextInputFormatter(30), LengthLimitingTextInputFormatter(30),
]), ]),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput().tfInput(
controller: state.pwdController, controller: state.pwdController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.pwdController); logic.checkNext(state.pwdController);
@ -244,7 +244,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp), TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp),
), ),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput().tfInput(
controller: state.sureController, controller: state.sureController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.sureController); logic.checkNext(state.sureController);
@ -267,7 +267,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: LoginInput( child: LoginInput().tfInput(
controller: state.codeController, controller: state.codeController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.codeController); logic.checkNext(state.codeController);

View File

@ -78,8 +78,8 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
"keyInfo": state.keyInfo.value "keyInfo": state.keyInfo.value
}).then((val) { }).then((val) {
if (val != null) { if (val != null) {
logic.mockNetworkDataRequest(); logic.pageNo = 1;
setState(() {}); mockRequest();
} }
}); });
}, },
@ -130,6 +130,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -40,7 +40,9 @@ class _AddCardPageState extends State<AddCardPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
state.selectType.value = widget.selectType; state.selectType.value = widget.selectType;
state.lockId.value = widget.lockId; state.lockId.value = widget.lockId;
state.nameController.text = widget.fromTypeTwoStaffName; if(widget.fromTypeTwoStaffName.isNotEmpty){
state.nameController.text = widget.fromTypeTwoStaffName;
}
state.fromType.value = widget.fromType; state.fromType.value = widget.fromType;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
@ -75,7 +77,7 @@ class _AddCardPageState extends State<AddCardPage> {
TranslationLoader.lanKeys!.pleaseEnter!.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr,
state.nameController), state.nameController),
keyTimeLimitWidget(), keyTimeLimitWidget(),
SizedBox(height: 10.h), // SizedBox(height: 10.h),
keyBottomWidget() keyBottomWidget()
], ],
); );

View File

@ -1,4 +1,4 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@ -340,13 +340,18 @@ class CardListLogic extends BaseGetXController {
); );
if(entity.errorCode!.codeIsSuccessful){ if(entity.errorCode!.codeIsSuccessful){
if(state.isDeletAll == false){ if(state.isDeletAll == false){
showToast("删除成功"); showToast("删除成功", something: (){
state.isDeletCardData = false;
pageNo = 1;
getICCardListData();
});
}else{ }else{
showToast("重置成功"); showToast("重置成功", something: (){
state.isDeletCardData = false;
pageNo = 1;
getICCardListData();
});
} }
state.isDeletCardData = false;
getICCardListData();
} }
} }

View File

@ -88,7 +88,8 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
KeySearchWidget( KeySearchWidget(
editingController: state.searchController, editingController: state.searchController,
onSubmittedAction: () { onSubmittedAction: () {
logic.getICCardListData(); logic.pageNo = 1;
getHttpData();
}, },
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
@ -103,7 +104,8 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
"fromType": 1 // 1 2 "fromType": 1 // 1 2
}); });
if (data != null) { if (data != null) {
logic.getICCardListData(); logic.pageNo = 1;
getHttpData();
} }
}, },
), ),
@ -136,6 +138,7 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -76,6 +76,7 @@ class _CheckingInStaffListPageState extends State<CheckingInStaffListPage> {
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -86,7 +86,8 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
KeySearchWidget( KeySearchWidget(
editingController: state.searchController, editingController: state.searchController,
onSubmittedAction: () { onSubmittedAction: () {
logic.mockNetworkDataRequest(); logic.pageNo = 1;
mockRequest();
}, },
), ),
SizedBox( SizedBox(
@ -106,8 +107,8 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
"keyInfo": state.keyInfo.value "keyInfo": state.keyInfo.value
}).then((val) { }).then((val) {
if (val != null) { if (val != null) {
logic.mockNetworkDataRequest(); logic.pageNo = 1;
setState(() {}); mockRequest();
} }
}); });
}, },
@ -166,6 +167,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -39,7 +39,9 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
state.seletType.value = widget.selectType; state.seletType.value = widget.selectType;
state.lockId.value = widget.lockId; state.lockId.value = widget.lockId;
state.nameController.text = widget.fromTypeTwoStaffName; if(widget.fromTypeTwoStaffName.isNotEmpty){
state.nameController.text = widget.fromTypeTwoStaffName;
}
state.fromType.value = widget.fromType; state.fromType.value = widget.fromType;
return indexChangeWidget(); return indexChangeWidget();

View File

@ -40,7 +40,9 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
state.selectType.value = widget.selectType; state.selectType.value = widget.selectType;
state.lockId.value = widget.lockId; state.lockId.value = widget.lockId;
state.nameController.text = widget.fromTypeTwoStaffName; if(widget.fromTypeTwoStaffName.isNotEmpty){
state.nameController.text = widget.fromTypeTwoStaffName;
}
state.fromType.value = widget.fromType; state.fromType.value = widget.fromType;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
@ -143,10 +145,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> {
onConfirm: (p) { onConfirm: (p) {
state.beginTime.value = state.beginTime.value =
'${p.year}-${p.month!.toString().padLeft(2, '0')}-${p.day!.toString().padLeft(2, '0')} ${p.hour!.toString().padLeft(2, '0')}:${p.minute!.toString().padLeft(2, '0')}'; '${p.year}-${p.month!.toString().padLeft(2, '0')}-${p.day!.toString().padLeft(2, '0')} ${p.hour!.toString().padLeft(2, '0')}:${p.minute!.toString().padLeft(2, '0')}';
state.beginTimeTimestamp.value = state.beginTimeTimestamp.value = DateTime.parse(state.beginTime.value).millisecondsSinceEpoch.toString();
DateTime.parse(state.beginTime.value)
.millisecondsSinceEpoch
.toString();
}); });
})), })),
Obx(() => CommonItem( Obx(() => CommonItem(
@ -156,12 +155,8 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> {
action: () { action: () {
Pickers.showDatePicker(context, mode: DateMode.YMDHM, Pickers.showDatePicker(context, mode: DateMode.YMDHM,
onConfirm: (p) { onConfirm: (p) {
state.endTime.value = state.endTime.value = '${p.year}-${p.month!.toString().padLeft(2, '0')}-${p.day!.toString().padLeft(2, '0')} ${p.hour!.toString().padLeft(2, '0')}:${p.minute!.toString().padLeft(2, '0')}';
'${p.year}-${p.month!.toString().padLeft(2, '0')}-${p.day!.toString().padLeft(2, '0')} ${p.hour!.toString().padLeft(2, '0')}:${p.minute!.toString().padLeft(2, '0')}'; state.endTimeTimestamp.value = DateTime.parse(state.endTime.value).millisecondsSinceEpoch.toString();
state.endTimeTimestamp.value =
DateTime.parse(state.endTime.value)
.millisecondsSinceEpoch
.toString();
}); });
})), })),
Container(height: 10.h), Container(height: 10.h),
@ -299,7 +294,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> {
], ],
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor), style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
controller: state.nameController, controller: state.nameController,
autofocus: false, // autofocus: false,
textAlign: TextAlign.end, textAlign: TextAlign.end,
decoration: InputDecoration( decoration: InputDecoration(
// //

View File

@ -334,6 +334,7 @@ class FingerprintListLogic extends BaseGetXController{
// //
Future<FingerprintListDataEntity> getFingerprintsListData() async{ Future<FingerprintListDataEntity> getFingerprintsListData() async{
// state.fingerprintItemListData.value.clear();
FingerprintListDataEntity entity = await ApiRepository.to.getFingerprintsListData( FingerprintListDataEntity entity = await ApiRepository.to.getFingerprintsListData(
lockId: state.lockId.value.toString(), lockId: state.lockId.value.toString(),
pageNo: pageNo.toString(), pageNo: pageNo.toString(),
@ -372,13 +373,18 @@ class FingerprintListLogic extends BaseGetXController{
); );
if(entity.errorCode!.codeIsSuccessful){ if(entity.errorCode!.codeIsSuccessful){
if(state.isDeletAll == false){ if(state.isDeletAll == false){
showToast("删除成功"); showToast("删除成功", something:(){
state.isDeletFingerprintData = false;
pageNo = 1;
getFingerprintsListData();
});
}else{ }else{
showToast("重置成功"); showToast("重置成功", something:(){
state.isDeletFingerprintData = false;
pageNo = 1;
getFingerprintsListData();
});
} }
state.isDeletFingerprintData = false;
getFingerprintsListData();
} }
} }

View File

@ -68,7 +68,7 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
onPressed: () async { onPressed: () async {
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot); var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
if (isDemoMode == false) { if (isDemoMode == false) {
showDeletAlertDialog(context); showDeletAlertDialog();
} else { } else {
// Get.toNamed(Routers.selectLockTypePage); // Get.toNamed(Routers.selectLockTypePage);
logic.showToast("演示模式"); logic.showToast("演示模式");
@ -90,7 +90,8 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
KeySearchWidget( KeySearchWidget(
editingController: state.searchController, editingController: state.searchController,
onSubmittedAction: () { onSubmittedAction: () {
logic.getFingerprintsListData(); logic.pageNo = 1;
getHttpData();
}, },
), ),
SizedBox( SizedBox(
@ -106,7 +107,8 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
"fromType": 1 // 1 2 "fromType": 1 // 1 2
}); });
if (data != null) { if (data != null) {
logic.getFingerprintsListData(); logic.pageNo = 1;
getHttpData();
} }
}, },
), ),
@ -133,11 +135,12 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
children: [ children: [
SlidableAction( SlidableAction(
onPressed: (BuildContext context){ onPressed: (BuildContext context){
showIosTipViewDialog(context); showIosTipViewDialog(fingerprintItemData.fingerprintId);
}, },
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, // foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),
@ -156,7 +159,8 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
"fingerprintItemData": fingerprintItemData, "fingerprintItemData": fingerprintItemData,
}); });
if (data != null) { if (data != null) {
logic.getFingerprintsListData(); logic.pageNo = 1;
getHttpData();
} }
}), }),
); );
@ -171,9 +175,9 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
) : NoData(noDataHeight: 1.sh - ScreenUtil().statusBarHeight - ScreenUtil().bottomBarHeight - 190.h - 64.h)); ) : NoData(noDataHeight: 1.sh - ScreenUtil().statusBarHeight - ScreenUtil().bottomBarHeight - 190.h - 64.h));
} }
void showIosTipViewDialog(BuildContext context) { void showIosTipViewDialog(int? fingerprintId) {
showDialog( showDialog(
context: context, context: Get.context!,
builder: (BuildContext context) { builder: (BuildContext context) {
return ShowIosTipView( return ShowIosTipView(
title: "提示", title: "提示",
@ -182,6 +186,7 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
Get.back(); Get.back();
state.isDeletFingerprintData = true; state.isDeletFingerprintData = true;
state.isDeletAll = false; state.isDeletAll = false;
state.deletKeyID = fingerprintId.toString();
state.deletUserID = (await Storage.getUid())!; state.deletUserID = (await Storage.getUid())!;
logic.senderAddFingerprint(); logic.senderAddFingerprint();
}, },
@ -262,9 +267,9 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
); );
} }
void showDeletAlertDialog(BuildContext context) { void showDeletAlertDialog() {
showCupertinoDialog( showCupertinoDialog(
context: context, context: Get.context!,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return CupertinoAlertDialog(
title: const Text("提示"), title: const Text("提示"),

View File

@ -6,6 +6,7 @@ import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord/keyOperationRecord_entity.dart'; import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord/keyOperationRecord_entity.dart';
import '../../../blue/blue_manage.dart'; import '../../../blue/blue_manage.dart';
@ -20,6 +21,7 @@ import '../../../network/api_repository.dart';
import '../../../tools/baseGetXController.dart'; import '../../../tools/baseGetXController.dart';
import '../../../tools/eventBusEventManage.dart'; import '../../../tools/eventBusEventManage.dart';
import '../../../tools/storage.dart'; import '../../../tools/storage.dart';
import '../../../translations/trans_lib.dart';
import '../lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart'; import '../lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
import 'lockDetail_state.dart'; import 'lockDetail_state.dart';
import 'lockNetToken_entity.dart'; import 'lockNetToken_entity.dart';
@ -93,8 +95,6 @@ class LockDetailLogic extends BaseGetXController {
getLockRecordLastUploadDataTime(); getLockRecordLastUploadDataTime();
state.openLockBtnState.value = 0; state.openLockBtnState.value = 0;
eventBus.fire(RefreshLockDetailInfoDataEvent()); eventBus.fire(RefreshLockDetailInfoDataEvent());
break; break;
case 0x06: case 0x06:
@ -651,7 +651,8 @@ class LockDetailLogic extends BaseGetXController {
lockUserNo: state.lockUserNo.toString()); lockUserNo: state.lockUserNo.toString());
if (entity.errorCode!.codeIsSuccessful) { if (entity.errorCode!.codeIsSuccessful) {
if (state.isOpenLockNeedOnline.value == 0) { if (state.isOpenLockNeedOnline.value == 0) {
state.bottomBtnisUneable.value = false; state.bottomBtnisEable.value = true;
eventBus.fire(RefreshLockDetailInfoDataEvent());
eventBus.fire(RefreshLockListInfoDataEvent()); eventBus.fire(RefreshLockListInfoDataEvent());
openDoorAction(1); openDoorAction(1);
} else { } else {
@ -725,6 +726,23 @@ class LockDetailLogic extends BaseGetXController {
}); });
} }
String getKeyStatusTextAndShow(){
String text = "";
if (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitIneffective ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
text = "你的钥匙${XSConstantMacro.getKeyStatusStr(state.keyInfos.value.keyStatus!)}";
} else {
text = state.isOpenPassageMode.value == 1
? "常开模式启动!长按闭锁"
: TranslationLoader
.lanKeys!.clickUnlockAndHoldDownClose!.tr;
}
return text;
}
// late StreamSubscription<List<DiscoveredDevice>> // late StreamSubscription<List<DiscoveredDevice>>
// _scanListDiscoveredDeviceSubscription; // _scanListDiscoveredDeviceSubscription;
// void _scanListDiscoveredDeviceSubscriptionAction() { // void _scanListDiscoveredDeviceSubscriptionAction() {

View File

@ -11,6 +11,7 @@ import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../../../blue/blue_manage.dart'; import '../../../blue/blue_manage.dart';
import '../../../blue/io_tool/io_tool.dart'; import '../../../blue/io_tool/io_tool.dart';
import '../../../common/XSConstantMacro/XSConstantMacro.dart';
import '../../../tools/appRouteObserver.dart'; import '../../../tools/appRouteObserver.dart';
import '../../../tools/dateTool.dart'; import '../../../tools/dateTool.dart';
import '../../../tools/eventBusEventManage.dart'; import '../../../tools/eventBusEventManage.dart';
@ -43,45 +44,8 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
// Get.log("LockDetailPage initState1111"); Get.log("LockDetailPage initState1111");
state.keyInfos.value = widget.lockListInfoItemEntity;
state.lockUserNo = state.keyInfos.value.lockUserNo!;
if (state.lockUserNo == 0) {
state.bottomBtnisUneable.value = true;
}
state.isOnlyOneData = widget.isOnlyOneData;
// print("state.lockUserNo==${state.lockUserNo}");
state.senderUserId = state.keyInfos.value.senderUserId!;
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
state.isOpenLockNeedOnline.value =
state.keyInfos.value.lockSetting!.appUnlockOnline!;
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
state.isOpenPassageMode.value = state.keyInfos.value.passageMode!;
state.lockAlias.value = state.keyInfos.value.lockAlias!;
BlueManage().connectDeviceName =
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
List<int> publicKeyData =
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
var saveStrList = changeIntListToStringList(publicKeyData);
Storage.setStringList(saveBluePublicKey, saveStrList);
//
List<int> privateKeyData =
state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
var savePrivateKeyList = changeIntListToStringList(privateKeyData);
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
// signKey
List<int> signKeyData =
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
var saveSignKeyList = changeIntListToStringList(signKeyData);
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
Storage.setStringList(saveBlueToken, saveTokenList);
// logic.startScanAction(); // logic.startScanAction();
listeningAnimations(); listeningAnimations();
@ -93,6 +57,14 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
_initRefreshLockDetailInfoDataEventAction(); _initRefreshLockDetailInfoDataEventAction();
} }
@override
void didChangeDependencies() {
super.didChangeDependencies();
Get.log("LockDetailPage didChangeDependencies2222");
///
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
}
StreamSubscription? _lockRefreshLockDetailInfoDataEvent; StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
void _initRefreshLockDetailInfoDataEventAction() { void _initRefreshLockDetailInfoDataEventAction() {
// eventBus // eventBus
@ -101,12 +73,74 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
}); });
} }
void loadData(){
// print("widget.lockListInfoItemEntity.lockUserNo:${widget.lockListInfoItemEntity.lockUserNo}");
// print("state.lockUserNo:${state.lockUserNo}");
state.keyInfos.value = widget.lockListInfoItemEntity;
state.lockUserNo = state.keyInfos.value.lockUserNo!;
if (state.lockUserNo == 0) {
state.bottomBtnisEable.value = false;
}else{
state.bottomBtnisEable.value = true;
}
// print("state.keyInfos.value.keyStatus:${state.keyInfos.value.keyStatus}");
if (state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitIneffective ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
state.openDoorBtnisUneable.value = false;
}else{
state.openDoorBtnisUneable.value = true;
}
state.isOnlyOneData = widget.isOnlyOneData;
// print("state.lockUserNo==${state.lockUserNo}");
state.senderUserId = state.keyInfos.value.senderUserId!;
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
state.isOpenLockNeedOnline.value =
state.keyInfos.value.lockSetting!.appUnlockOnline!;
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
state.isOpenPassageMode.value = state.keyInfos.value.passageMode!;
state.lockAlias.value = state.keyInfos.value.lockAlias!;
BlueManage().connectDeviceName =
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
List<int> publicKeyData =
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
var saveStrList = changeIntListToStringList(publicKeyData);
Storage.setStringList(saveBluePublicKey, saveStrList);
//
List<int> privateKeyData =
state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
var savePrivateKeyList = changeIntListToStringList(privateKeyData);
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
// signKey
List<int> signKeyData =
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
var saveSignKeyList = changeIntListToStringList(signKeyData);
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
Storage.setStringList(saveBlueToken, saveTokenList);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
loadData();
return ListView( return ListView(
children: [ children: [
Visibility( Visibility(
visible: false, visible: (
(state.keyInfos.value.keyType == XSConstantMacro.keyTypeTime || state.keyInfos.value.keyType == XSConstantMacro.keyTypeLoop) && //
(DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) < 30 && DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!) > 0) &&// 030
(state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusNormalUse || state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusWaitReceive)// 使
) ? true : false,
child: Container( child: Container(
// height: 30.h, // height: 30.h,
color: const Color(0xFFFBEFD4), color: const Color(0xFFFBEFD4),
@ -114,7 +148,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("钥匙将在2天后失效", Text("钥匙将在${DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!)}天后失效",
style: TextStyle( style: TextStyle(
color: const Color(0xffCBA74B), fontSize: 24.sp)) color: const Color(0xffCBA74B), fontSize: 24.sp))
], ],
@ -259,21 +293,39 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
children: [ children: [
Center( Center(
child: GestureDetector( child: GestureDetector(
onTap: state.openDoorBtnisUneable.value == true ? () {
// Get.log("点击开锁");
setState(() {
startOpenLock();
});
} : null,
onLongPressStart: state.openDoorBtnisUneable.value == true ? (details) {
Get.log("长按闭锁");
setState(() {
startUnLock();
});
// startUnLock();
}:null,
child: Stack( child: Stack(
children: [ children: [
Image.asset( Image.asset(
// state.connectState.value == 0 ? 'images/main/icon_main_openLockBtn_grey.png' : 'images/main/icon_main_openLockBtn_center.png', state.openDoorBtnisUneable.value == false ? 'images/main/icon_main_openLockBtn_grey.png' : (state.isOpenPassageMode.value == 1
state.isOpenPassageMode.value == 1
? 'images/main/icon_main_normallyOpenMode_center.png' ? 'images/main/icon_main_normallyOpenMode_center.png'
: 'images/main/icon_main_openLockBtn_center.png', : 'images/main/icon_main_openLockBtn_center.png'),
width: 330.w, width: 330.w,
height: 330.w, height: 330.w,
), ),
state.openDoorBtnisUneable.value == false ? Positioned(
child: Image.asset(
'images/main/icon_main_openLockBtn_grey.png',
width: 330.w,
height: 330.w,
),
) :
state.openLockBtnState.value == 1 state.openLockBtnState.value == 1
? buildRotationTransition() ? buildRotationTransition()
: Positioned( : Positioned(
child: Image.asset( child: Image.asset(
// 'images/main/icon_main_openLockBtn_circle.png',
state.isOpenPassageMode.value == 1 state.isOpenPassageMode.value == 1
? 'images/main/icon_main_normallyOpenMode_circle.png' ? 'images/main/icon_main_normallyOpenMode_circle.png'
: 'images/main/icon_main_openLockBtn_circle.png', : 'images/main/icon_main_openLockBtn_circle.png',
@ -282,19 +334,6 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
)), )),
], ],
), ),
onTap: () {
// Get.log("点击开锁");
setState(() {
startOpenLock();
});
},
onLongPressStart: (details) {
Get.log("长按闭锁");
setState(() {
startUnLock();
});
// startUnLock();
},
)), )),
], ],
), ),
@ -321,10 +360,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
state.isOpenPassageMode.value == 1 logic.getKeyStatusTextAndShow(),
? "常开模式启动!长按闭锁"
: TranslationLoader
.lanKeys!.clickUnlockAndHoldDownClose!.tr,
style: TextStyle( style: TextStyle(
fontSize: 22.sp, fontSize: 22.sp,
color: AppColors.btnDisableColor, color: AppColors.btnDisableColor,
@ -468,7 +504,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
// //
showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件', showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件',
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Navigator.pushNamed(context, Routers.accessoriesListPage); Navigator.pushNamed(context, Routers.accessoriesListPage);
})); }));
@ -507,7 +543,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_clockingIn.png', 'images/main/icon_main_clockingIn.png',
TranslationLoader.lanKeys!.checkingIn!.tr, TranslationLoader.lanKeys!.checkingIn!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.checkingInListPage, Get.toNamed(Routers.checkingInListPage,
arguments: state.keyInfos.value); arguments: state.keyInfos.value);
})); }));
@ -516,14 +552,14 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_operatingRecord.png', 'images/main/icon_main_operatingRecord.png',
TranslationLoader.lanKeys!.operatingRecord!.tr, TranslationLoader.lanKeys!.operatingRecord!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.lockOperatingRecordPage, Get.toNamed(Routers.lockOperatingRecordPage,
arguments: {"keyInfo": state.keyInfos.value}); arguments: {"keyInfo": state.keyInfos.value});
})); }));
// //
showWidgetArr.add(bottomItem('images/main/icon_main_set.png', showWidgetArr.add(bottomItem('images/main/icon_main_set.png',
TranslationLoader.lanKeys!.set!.tr, state.bottomBtnisUneable.value, () { TranslationLoader.lanKeys!.set!.tr, state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.lockSetPage, arguments: { Get.toNamed(Routers.lockSetPage, arguments: {
"lockId": state.keyInfos.value.lockId, "lockId": state.keyInfos.value.lockId,
"isOnlyOneData": state.isOnlyOneData "isOnlyOneData": state.isOnlyOneData
@ -541,7 +577,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_clockingIn.png', 'images/main/icon_main_clockingIn.png',
TranslationLoader.lanKeys!.checkingIn!.tr, TranslationLoader.lanKeys!.checkingIn!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.checkingInListPage, Get.toNamed(Routers.checkingInListPage,
arguments: state.keyInfos.value); arguments: state.keyInfos.value);
})); }));
@ -551,7 +587,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_electronicKey.png', 'images/main/icon_main_electronicKey.png',
TranslationLoader.lanKeys!.electronicKey!.tr, TranslationLoader.lanKeys!.electronicKey!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.electronicKeyListPage, Get.toNamed(Routers.electronicKeyListPage,
arguments: {"keyInfo": state.keyInfos.value}); arguments: {"keyInfo": state.keyInfos.value});
})); }));
@ -560,7 +596,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_password.png', 'images/main/icon_main_password.png',
TranslationLoader.lanKeys!.password!.tr, TranslationLoader.lanKeys!.password!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.passwordKeyListPage, Get.toNamed(Routers.passwordKeyListPage,
arguments: {"keyInfo": state.keyInfos.value}); arguments: {"keyInfo": state.keyInfos.value});
})); }));
@ -570,7 +606,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_icCard.png', 'images/main/icon_main_icCard.png',
TranslationLoader.lanKeys!.card!.tr, TranslationLoader.lanKeys!.card!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
// logic.showToast("普通用户第一次需要在锁旁边操作哦。", something: () { // logic.showToast("普通用户第一次需要在锁旁边操作哦。", something: () {
// logic.showEasyLoading(); // logic.showEasyLoading();
// }); // });
@ -585,7 +621,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_fingerprint.png', 'images/main/icon_main_fingerprint.png',
TranslationLoader.lanKeys!.fingerprint!.tr, TranslationLoader.lanKeys!.fingerprint!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.fingerprintListPage, arguments: { Get.toNamed(Routers.fingerprintListPage, arguments: {
"lockId": state.keyInfos.value.lockId, "lockId": state.keyInfos.value.lockId,
}); });
@ -597,7 +633,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_remoteControl.png', 'images/main/icon_main_remoteControl.png',
TranslationLoader.lanKeys!.remoteControl!.tr, TranslationLoader.lanKeys!.remoteControl!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.remoteControlListPage); Get.toNamed(Routers.remoteControlListPage);
})); }));
} }
@ -608,7 +644,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
bottomItem( bottomItem(
'images/main/icon_face.png', 'images/main/icon_face.png',
TranslationLoader.lanKeys!.humanFace!.tr, TranslationLoader.lanKeys!.humanFace!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.faceList, arguments: { Get.toNamed(Routers.faceList, arguments: {
"lockId": state.keyInfos.value.lockId, "lockId": state.keyInfos.value.lockId,
}); // Toast.show(msg: "功能暂未开放"); }); // Toast.show(msg: "功能暂未开放");
@ -622,7 +658,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
bottomItem( bottomItem(
'images/main/icon_catEyes.png', 'images/main/icon_catEyes.png',
TranslationLoader.lanKeys!.monitoring!.tr, TranslationLoader.lanKeys!.monitoring!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.realTimePicturePage, arguments: { Get.toNamed(Routers.realTimePicturePage, arguments: {
"lockName": state.keyInfos.value.lockName, "lockName": state.keyInfos.value.lockName,
"isMonitoring": true "isMonitoring": true
@ -636,7 +672,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
showWidgetArr.add(bottomItem( showWidgetArr.add(bottomItem(
'images/main/icon_main_authorizedAdmin.png', 'images/main/icon_main_authorizedAdmin.png',
TranslationLoader.lanKeys!.authorizedAdmin!.tr, TranslationLoader.lanKeys!.authorizedAdmin!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.authorizedAdminListPage, Get.toNamed(Routers.authorizedAdminListPage,
arguments: {"keyInfo": state.keyInfos.value}); arguments: {"keyInfo": state.keyInfos.value});
})); }));
@ -651,7 +687,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
bottomItem( bottomItem(
'images/main/icon_main_operatingRecord.png', 'images/main/icon_main_operatingRecord.png',
TranslationLoader.lanKeys!.operatingRecord!.tr, TranslationLoader.lanKeys!.operatingRecord!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
// Get.toNamed(Routers.lockOperatingRecordPage, // Get.toNamed(Routers.lockOperatingRecordPage,
// arguments: {"keyInfo": state.keyInfos.value}); // arguments: {"keyInfo": state.keyInfos.value});
Get.toNamed(Routers.doorLockLogPage, Get.toNamed(Routers.doorLockLogPage,
@ -661,7 +697,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
bottomItem( bottomItem(
'images/main/icon_lockDetail_videoLog.png', 'images/main/icon_lockDetail_videoLog.png',
TranslationLoader.lanKeys!.videoLog!.tr, TranslationLoader.lanKeys!.videoLog!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
// //
Get.toNamed(Routers.videoLogPage); Get.toNamed(Routers.videoLogPage);
}), }),
@ -669,14 +705,11 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
bottomItem( bottomItem(
'images/main/icon_lockDetail_messageReminding.png', 'images/main/icon_lockDetail_messageReminding.png',
TranslationLoader.lanKeys!.messageReminding!.tr, TranslationLoader.lanKeys!.messageReminding!.tr,
state.bottomBtnisUneable.value, () { state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
Get.toNamed(Routers.msgNotificationPage); Get.toNamed(Routers.msgNotificationPage);
}), }),
// //
bottomItem( bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
'images/main/icon_main_set.png',
TranslationLoader.lanKeys!.set!.tr,
state.bottomBtnisUneable.value, () {
// logic.clickItemBtnAction(10); // logic.clickItemBtnAction(10);
Get.toNamed(Routers.lockSetPage, arguments: { Get.toNamed(Routers.lockSetPage, arguments: {
"lockId": state.keyInfos.value.lockId, "lockId": state.keyInfos.value.lockId,
@ -689,16 +722,13 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
} }
// //
Widget bottomItem( Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable, bool bottomBtnisEable, Function() onClick) {
String iconUrl, String name, bool isForbidden, Function() onClick) {
var width = 42.w; var width = 42.w;
var height = 42.h; var height = 42.h;
return GestureDetector( return GestureDetector(
onTap: isForbidden onTap:openDoorBtnisUneable ? (bottomBtnisEable ? onClick : () {
? () { logic.showToast("请在锁旁边完成第一次开锁");
logic.showToast("请在锁旁边完成第一次开锁"); }) : null,
}
: onClick,
child: Container( child: Container(
// height: 300.h, // height: 300.h,
color: Colors.white, color: Colors.white,
@ -707,14 +737,13 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
children: [ children: [
SizedBox( SizedBox(
width: width, width: width,
height: height: height,
height, // isForbidden ? "${iconUrl}_uneable.png" :"${iconUrl}.png"
child: Image.asset(iconUrl, child: Image.asset(iconUrl,
width: width, width: width,
height: height, height: height,
color: isForbidden color: openDoorBtnisUneable ? (bottomBtnisEable
? AppColors.lockDetailBottomBtnUneable ? AppColors.mainColor
: AppColors.mainColor, : AppColors.lockDetailBottomBtnUneable) : AppColors.lockDetailBottomBtnUneable,
fit: BoxFit.fitWidth), fit: BoxFit.fitWidth),
), ),
SizedBox(height: 10.w), SizedBox(height: 10.w),
@ -722,9 +751,9 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
child: Text(name, child: Text(name,
style: TextStyle( style: TextStyle(
fontSize: 20.sp, fontSize: 20.sp,
color: isForbidden color:openDoorBtnisUneable ? (bottomBtnisEable
? AppColors.lockDetailBottomBtnUneable ? AppColors.blackColor
: AppColors.blackColor), : AppColors.lockDetailBottomBtnUneable) : AppColors.lockDetailBottomBtnUneable),
textAlign: TextAlign.center)) textAlign: TextAlign.center))
], ],
)), )),
@ -747,8 +776,6 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
} }
}); });
}); });
// logic.connectBlueAndAnimationController();
} }
String showElectricIcon(int electricnumber) { String showElectricIcon(int electricnumber) {
@ -865,7 +892,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
// lockUserNo为0 // lockUserNo为0
logic.addUserConnectBlue(); logic.addUserConnectBlue();
} else { } else {
print("state.isOpenLockNeedOnline.value:${state.isOpenLockNeedOnline.value}"); // print("state.isOpenLockNeedOnline.value:${state.isOpenLockNeedOnline.value}");
if (state.isOpenLockNeedOnline.value == 0) { if (state.isOpenLockNeedOnline.value == 0) {
// //
logic.openDoorAction(1); logic.openDoorAction(1);
@ -894,14 +921,14 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
} }
} }
@override // @override
void didChangeDependencies() { // void didChangeDependencies() {
// TODO: implement didChangeDependencies // // TODO: implement didChangeDependencies
super.didChangeDependencies(); // super.didChangeDependencies();
//
/// // ///
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!); // AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
} // }
@override @override
void dispose() { void dispose() {

View File

@ -35,7 +35,8 @@ class LockDetailState {
var iSOpenLock = true.obs; // var iSOpenLock = true.obs; //
Timer? closedUnlockSuccessfulTimer; Timer? closedUnlockSuccessfulTimer;
var bottomBtnisUneable = false.obs; // var bottomBtnisEable = true.obs; //
var openDoorBtnisUneable = true.obs; // 使使,
// //
AnimationController? animationController; AnimationController? animationController;

View File

@ -11,7 +11,9 @@ class BasicInformationState {
BasicInformationState() { BasicInformationState() {
var map = Get.arguments; var map = Get.arguments;
lockSetInfoData.value = map["lockSetInfoData"]; if(map["lockSetInfoData"] != null){
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!; lockSetInfoData.value = map["lockSetInfoData"];
lockBasicInfo.value = lockSetInfoData.value.lockBasicInfo!;
}
} }
} }

View File

@ -42,7 +42,7 @@ class _EditLockNamePageState extends State<EditLockNamePage> {
), ),
body: Container( body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w), margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: LoginInput( child: LoginInput().tfInput(
controller: state.changeLockNameController, controller: state.changeLockNameController,
leftWidget: const SizedBox(), leftWidget: const SizedBox(),
hintText: "请输入名称", hintText: "请输入名称",

View File

@ -1,10 +1,10 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter_blue_plus/flutter_blue_plus.dart'; import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import '../../../../blue/blue_manage.dart'; import '../../../../blue/blue_manage.dart';
import '../../../../blue/io_protocol/io_getStarLockStatusInfo.dart';
import '../../../../blue/io_protocol/io_timing.dart'; import '../../../../blue/io_protocol/io_timing.dart';
import '../../../../blue/io_reply.dart'; import '../../../../blue/io_reply.dart';
import '../../../../blue/io_tool/io_tool.dart'; import '../../../../blue/io_tool/io_tool.dart';
@ -28,58 +28,56 @@ class LockTimeLogic extends BaseGetXController{
} }
// //
// if(reply is GetLockStatuReply) { if(reply is GetStarLockStatuInfoReply && state.ifCurrentScreen.value == true) {
// _replyGetLockStatus(reply); _replyGetStarLockStatusInfo(reply);
// } }
}); });
} }
// //
// Future<void> _replyGetLockStatus(Reply reply) async { Future<void> _replyGetStarLockStatusInfo(Reply reply) async {
// int status = reply.data[2]; int status = reply.data[2];
// switch(status){ switch (status) {
// case 0x00: case 0x00:
// // //
// print("${reply.commandType}数据解析成功"); print("${reply.commandType}数据解析成功");
//
// // cancelBlueConnetctToastTimer();
// var lockTime = reply.data.sublist(60, 64); dismissEasyLoading();
//
// int value = ( //
// (0xff & lockTime[(0)]) << 24 | var indate = reply.data.sublist(149, 153);
// (0xff & lockTime[1]) << 16 | int indateValue = ((0xff & indate[(0)]) << 24 |
// (0xff & lockTime[2]) << 8 | (0xff & indate[1]) << 16 |
// (0xFF & lockTime[3])); (0xff & indate[2]) << 8 |
// (0xFF & indate[3]));
// String dataEime = DateTool().dateToYMDHNSString("$value"); state.dateTime.value = DateTool().dateToYMDHNSString("$indateValue");
// state.dateTime.value = dataEime; // state.dateTime = indateValue * 1000;
// print("indate:$indate indateValue:$indateValue");
// // String dataEime = DateTool().dateToYMDHNSString("${value}");
// // state.dateTime.value = dataEime; break;
// print("lockTime:$lockTime value:$value dataEime:$dataEime"); case 0x06:
// break; //
// case 0x06: print("${reply.commandType}需要鉴权");
// //
// print("${reply.commandType}需要鉴权"); break;
// case 0x07:
// break; //
// case 0x07: print("${reply.commandType}用户无权限");
// //
// print("${reply.commandType}用户无权限"); break;
// case 0x09:
// break; //
// case 0x09: print("${reply.commandType}权限校验错误");
// //
// print("${reply.commandType}权限校验错误"); break;
// default:
// break; //
// default: print("${reply.commandType}失败");
// //
// print("${reply.commandType}失败"); break;
// }
// break; }
// }
// }
// //
Future<void> _replyTiming(Reply reply) async { Future<void> _replyTiming(Reply reply) async {
@ -88,17 +86,20 @@ class LockTimeLogic extends BaseGetXController{
case 0x00: case 0x00:
// //
print("${reply.commandType}数据解析成功"); print("${reply.commandType}数据解析成功");
// var lockTime = reply.data.sublist(4, 8); // var lockTime = reply.data.sublist(4, 8);
//
// int value = ( // int value = (
// (0xff & lockTime[(0)]) << 24 | // (0xff & lockTime[(0)]) << 24 |
// (0xff & lockTime[1]) << 16 | // (0xff & lockTime[1]) << 16 |
// (0xff & lockTime[2]) << 8 | // (0xff & lockTime[2]) << 8 |
// (0xFF & lockTime[3])); // (0xFF & lockTime[3]));
//
// String dataEime = DateTool().dateToYMDHNSString("$value"); // String dataEime = DateTool().dateToYMDHNSString("$value");
// state.dateTime.value = dataEime; // state.dateTime.value = dataEime;
String dataEime = DateTool().dateToYMDHNSString("${state.dateTimestamp.value}");
state.dateTime.value = dataEime;
state.sureBtnState.value = 0; state.sureBtnState.value = 0;
cancelBlueConnetctToastTimer(); cancelBlueConnetctToastTimer();
dismissEasyLoading(); dismissEasyLoading();
@ -153,7 +154,8 @@ class LockTimeLogic extends BaseGetXController{
IoSenderManage.senderTimingCommand( IoSenderManage.senderTimingCommand(
lockID:BlueManage().connectDeviceName, lockID:BlueManage().connectDeviceName,
userID:await Storage.getUid(), userID:await Storage.getUid(),
nowTime:DateTime.now().millisecondsSinceEpoch~/1000, // nowTime:DateTime.now().millisecondsSinceEpoch~/1000,
nowTime: state.dateTimestamp.value,
token:getTokenList, token:getTokenList,
needAuthor:1, needAuthor:1,
signKey:getSignKeyList, signKey:getSignKeyList,
@ -170,6 +172,33 @@ class LockTimeLogic extends BaseGetXController{
}); });
} }
//
Future<void> getStarLockStatus() async {
showEasyLoading();
showBlueConnetctToastTimer(action: () {
dismissEasyLoading();
});
BlueManage().bludSendData(BlueManage().connectDeviceName,
(BluetoothConnectionState deviceConnectionState) async {
if (deviceConnectionState == BluetoothConnectionState.connected) {
dismissEasyLoading();
var privateKey = await Storage.getStringList(saveBluePrivateKey);
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
IoSenderManage.senderGetStarLockStatuInfo(
lockID: BlueManage().connectDeviceName,
userID: await Storage.getUid(),
privateKey: getPrivateKeyList,
);
} else if (deviceConnectionState == BluetoothConnectionState.disconnected) {
dismissEasyLoading();
cancelBlueConnetctToastTimer();
if (state.ifCurrentScreen.value == true) {
showBlueConnetctToast();
}
}
});
}
// //
void getLockTimeFromGateway() async{ void getLockTimeFromGateway() async{
var entity = await ApiRepository.to.getLockTimeFromGateway( var entity = await ApiRepository.to.getLockTimeFromGateway(
@ -186,8 +215,7 @@ class LockTimeLogic extends BaseGetXController{
lockId: state.lockSetInfoData.value.lockId.toString(), lockId: state.lockSetInfoData.value.lockId.toString(),
); );
if(entity.errorCode!.codeIsSuccessful){ if(entity.errorCode!.codeIsSuccessful){
String dataEime = DateTool().dateToYMDHNSString("${entity.data!.date!}"); state.dateTimestamp.value = entity.data!.date!;
state.dateTime.value = dataEime;
if(isSendBlue){ if(isSendBlue){
sendTiming(); sendTiming();
} }
@ -201,8 +229,10 @@ class LockTimeLogic extends BaseGetXController{
print("onReady()"); print("onReady()");
_initReplySubscription(); _initReplySubscription();
// getStarLockStatus();
// getLockTimeFromGateway(); // getLockTimeFromGateway();
getServerDatetime(false); // getServerDatetime(false);
} }
@override @override

View File

@ -5,6 +5,7 @@ import '../lockSet/lockSetInfo_entity.dart';
class LockTimeState{ class LockTimeState{
var lockSetInfoData = LockSetInfoData().obs; var lockSetInfoData = LockSetInfoData().obs;
var dateTime = "".obs; var dateTime = "".obs;
var dateTimestamp = 0.obs;
var ifCurrentScreen = true.obs; // , var ifCurrentScreen = true.obs; // ,
var sureBtnState = 0.obs;// 0() 1() var sureBtnState = 0.obs;// 0() 1()

View File

@ -83,7 +83,8 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
KeySearchWidget( KeySearchWidget(
editingController: state.searchController, editingController: state.searchController,
onSubmittedAction: () { onSubmittedAction: () {
logic.mockNetworkDataRequest(); logic.pageNo = 1;
getHttpData();
}, },
), ),
SizedBox( SizedBox(
@ -100,7 +101,8 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
Navigator.pushNamed(context, Routers.passwordKeyManagePage, Navigator.pushNamed(context, Routers.passwordKeyManagePage,
arguments: {"keyInfo": state.keyInfo.value}).then((val) { arguments: {"keyInfo": state.keyInfo.value}).then((val) {
if (val != null) { if (val != null) {
logic.mockNetworkDataRequest(); logic.pageNo = 1;
getHttpData();
} }
}); });
}), }),
@ -137,6 +139,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -1,6 +1,7 @@
import 'package:star_lock/tools/baseGetXController.dart'; import 'package:star_lock/tools/baseGetXController.dart';
import '../../../common/XSConstantMacro/XSConstantMacro.dart'; import '../../../common/XSConstantMacro/XSConstantMacro.dart';
import '../../../tools/dateTool.dart';
import '../entity/lockListInfo_entity.dart'; import '../entity/lockListInfo_entity.dart';
import 'lockList_state.dart'; import 'lockList_state.dart';
@ -27,35 +28,11 @@ class LockListLogic extends BaseGetXController{
if(keyInfo.keyType == XSConstantMacro.keyTypeTime || keyInfo.keyType == XSConstantMacro.keyTypeLoop){ if(keyInfo.keyType == XSConstantMacro.keyTypeTime || keyInfo.keyType == XSConstantMacro.keyTypeLoop){
// 使 // 使
if(keyInfo.keyStatus == XSConstantMacro.keyStatusNormalUse || keyInfo.keyStatus == XSConstantMacro.keyStatusWaitReceive) { if(keyInfo.keyStatus == XSConstantMacro.keyStatusNormalUse || keyInfo.keyStatus == XSConstantMacro.keyStatusWaitReceive) {
return "${compareTimeGetDaysFromNow(keyInfo.endDate!)}"; return "${DateTool().compareTimeGetDaysFromNow(keyInfo.endDate!)}";
} else { } else {
return XSConstantMacro.getKeyStatusStr(keyInfo.keyStatus!); return XSConstantMacro.getKeyStatusStr(keyInfo.keyStatus!);
} }
} }
return ""; return "";
} }
///
bool compareTimeIsOvertime(int endTiem){
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(endTiem); // DateTime
DateTime now = DateTime.now(); //
if (now.isAfter(dateTime)) {
print('The timestamp is after the current time.');
//
return true;
} else {
print('The timestamp is not after the current time.');
return false;
}
}
/// 1705132260000
int compareTimeGetDaysFromNow(int endTiem){
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(endTiem); // DateTime
DateTime now = DateTime.now(); //
Duration difference = dateTime.difference(now); //
int days = difference.inDays; //
print('dateTime:$dateTime now:$now The difference is $days days.');
return days;
}
} }

View File

@ -6,6 +6,7 @@ import 'package:get/get.dart';
import '../../../appRouters.dart'; import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../../../common/XSConstantMacro/XSConstantMacro.dart'; import '../../../common/XSConstantMacro/XSConstantMacro.dart';
import '../../../tools/dateTool.dart';
import '../entity/lockListInfo_entity.dart'; import '../entity/lockListInfo_entity.dart';
import 'lockListGroup_page.dart'; import 'lockListGroup_page.dart';
import 'lockList_logic.dart'; import 'lockList_logic.dart';
@ -98,7 +99,7 @@ class _LockListPageState extends State<LockListPage> {
} }
// print("lockItemList.length:${lockItemList.length} == ${index+1} $isLast"); // print("lockItemList.length:${lockItemList.length} == ${index+1} $isLast");
return lockInfoListItem(keyInfo, isLast, () { return lockInfoListItem(keyInfo, isLast, () {
if(logic.compareTimeIsOvertime(keyInfo.endDate!) && keyInfo.keyType == XSConstantMacro.keyTypeTime){ if(DateTool().compareTimeIsOvertime(keyInfo.endDate!) && keyInfo.keyType == XSConstantMacro.keyTypeTime){
logic.showToast("钥匙已过期"); logic.showToast("钥匙已过期");
return; return;
} }
@ -123,7 +124,7 @@ class _LockListPageState extends State<LockListPage> {
// height: 122.h, // height: 122.h,
margin: isLast ? EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w, bottom: 20.w) : EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w), margin: isLast ? EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w, bottom: 20.w) : EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: (logic.compareTimeIsOvertime(keyInfo.endDate!) && keyInfo.keyType == XSConstantMacro.keyTypeTime) ? AppColors.greyBackgroundColor : Colors.white, color: (DateTool().compareTimeIsOvertime(keyInfo.endDate!) && keyInfo.keyType == XSConstantMacro.keyTypeTime) ? AppColors.greyBackgroundColor : Colors.white,
borderRadius: BorderRadius.circular(20.w), borderRadius: BorderRadius.circular(20.w),
), ),
child: Column( child: Column(
@ -193,7 +194,7 @@ class _LockListPageState extends State<LockListPage> {
)), )),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Visibility( Visibility(
visible: (keyInfo.keyType == XSConstantMacro.keyTypeTime || keyInfo.keyType == XSConstantMacro.keyTypeLoop) ? true : false, visible: ((keyInfo.keyType == XSConstantMacro.keyTypeTime || keyInfo.keyType == XSConstantMacro.keyTypeLoop) && (DateTool().compareTimeGetDaysFromNow(keyInfo.endDate!) < 30 && DateTool().compareTimeGetDaysFromNow(keyInfo.endDate!) > 0)) ? true : false,
// visible: true, // visible: true,
child:Row( child:Row(
children: [ children: [
@ -202,7 +203,7 @@ class _LockListPageState extends State<LockListPage> {
padding: EdgeInsets.only(right: 5.w, left: 5.w), padding: EdgeInsets.only(right: 5.w, left: 5.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.w), borderRadius: BorderRadius.circular(5.w),
color: logic.compareTimeIsOvertime(keyInfo.endDate!) ? AppColors.listTimeYellowColor : AppColors.mainColor, color: DateTool().compareTimeIsOvertime(keyInfo.endDate!) ? AppColors.listTimeYellowColor : AppColors.mainColor,
), ),
child: Text(logic.getKeyEffective(keyInfo), style: TextStyle(fontSize: 18.sp, color: Colors.white) child: Text(logic.getKeyEffective(keyInfo), style: TextStyle(fontSize: 18.sp, color: Colors.white)
// child: Text(logic.compareTimeIsOvertime(keyInfo.endDate!) ? "已过期" : "${logic.compareTimeGetDaysFromNow(keyInfo.endDate!)}", style: TextStyle(fontSize: 18.sp, color: Colors.white) // child: Text(logic.compareTimeIsOvertime(keyInfo.endDate!) ? "已过期" : "${logic.compareTimeGetDaysFromNow(keyInfo.endDate!)}", style: TextStyle(fontSize: 18.sp, color: Colors.white)

View File

@ -85,7 +85,7 @@ class LockMainLogic extends BaseGetXController {
print("onReady()"); print("onReady()");
// UDP // UDP
UdpHelp().openUDP(); // UdpHelp().openUDP();
BlueManage(); BlueManage();
} }

View File

@ -139,6 +139,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
case 1: case 1:
// //
Storage.setBool(ifIsDemoModeOrNot, false); Storage.setBool(ifIsDemoModeOrNot, false);
print("state.lockListInfoEntity.value.data!.groupList![0].lockList![0]:${state.lockListInfoEntity.value.data!.groupList![0].lockList![0].endDate}");
returnWidget = LockDetailPage( returnWidget = LockDetailPage(
isOnlyOneData: true, isOnlyOneData: true,
lockListInfoItemEntity: state lockListInfoItemEntity: state

View File

@ -77,6 +77,7 @@ class _MessageListPageState extends State<MessageListPage> with TickerProviderSt
backgroundColor: Colors.red, backgroundColor: Colors.red,
foregroundColor: Colors.white, foregroundColor: Colors.white,
label: '删除', label: '删除',
padding: EdgeInsets.only(left: 5.w, right: 5.w),
), ),
], ],
), ),

View File

@ -89,7 +89,7 @@ class _MinePersonInfoEditIphonePageState
color: Colors.grey, color: Colors.grey,
), ),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput().tfInput(
controller: _phoneController, controller: _phoneController,
isPwd: true, isPwd: true,
leftWidget: const SizedBox(), leftWidget: const SizedBox(),
@ -102,7 +102,7 @@ class _MinePersonInfoEditIphonePageState
Row( Row(
children: [ children: [
Expanded( Expanded(
child: LoginInput( child: LoginInput().tfInput(
controller: _codeController, controller: _codeController,
isPwd: true, isPwd: true,
leftWidget: const SizedBox(), leftWidget: const SizedBox(),

View File

@ -50,7 +50,7 @@ class _MinePersonInfoEditNamePageState
padding: EdgeInsets.all(15.w), padding: EdgeInsets.all(15.w),
child: Column( child: Column(
children: [ children: [
LoginInput( LoginInput().tfInput(
controller: state.nickNameController, controller: state.nickNameController,
onchangeAction: (textStr) { onchangeAction: (textStr) {
logic.checkNext(state.nickNameController); logic.checkNext(state.nickNameController);

View File

@ -45,7 +45,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
: TranslationLoader.lanKeys!.changeEmailTip!.tr, : TranslationLoader.lanKeys!.changeEmailTip!.tr,
style: TextStyle(fontSize: 20.sp), style: TextStyle(fontSize: 20.sp),
)), )),
LoginInput( LoginInput().tfInput(
controller: state.accountController, controller: state.accountController,
isPwd: false, isPwd: false,
onchangeAction: (textStr) { onchangeAction: (textStr) {
@ -62,7 +62,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: LoginInput( child: LoginInput().tfInput(
controller: state.codeController, controller: state.codeController,
isPwd: false, isPwd: false,
leftWidget: const SizedBox(), leftWidget: const SizedBox(),

View File

@ -36,7 +36,7 @@ class _MinePersonInfoResetPasswordPageState
margin: EdgeInsets.only(left: 30.w, right: 30.w), margin: EdgeInsets.only(left: 30.w, right: 30.w),
child: Column( child: Column(
children: [ children: [
LoginInput( LoginInput().tfInput(
controller: state.oldPwdController, controller: state.oldPwdController,
onchangeAction: (textStr) { onchangeAction: (textStr) {
logic.changeInput(state.oldPwdController); logic.changeInput(state.oldPwdController);
@ -50,7 +50,7 @@ class _MinePersonInfoResetPasswordPageState
inputFormatters: [ inputFormatters: [
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
LoginInput( LoginInput().tfInput(
controller: state.newPwdController, controller: state.newPwdController,
onchangeAction: (textStr) { onchangeAction: (textStr) {
logic.changeInput(state.newPwdController); logic.changeInput(state.newPwdController);
@ -64,7 +64,7 @@ class _MinePersonInfoResetPasswordPageState
inputFormatters: [ inputFormatters: [
LengthLimitingTextInputFormatter(20), LengthLimitingTextInputFormatter(20),
]), ]),
LoginInput( LoginInput().tfInput(
controller: state.surePwdController, controller: state.surePwdController,
onchangeAction: (textStr) { onchangeAction: (textStr) {
logic.changeInput(state.surePwdController); logic.changeInput(state.surePwdController);

View File

@ -47,6 +47,7 @@ class _EasyRefreshToolState extends State<EasyRefreshTool> {
controller: _controller, controller: _controller,
header: const MaterialHeader(), header: const MaterialHeader(),
footer: const MaterialFooter(), footer: const MaterialFooter(),
triggerAxis: Axis.vertical,
onRefresh: widget.onRefresh!=null?() async { onRefresh: widget.onRefresh!=null?() async {
if(widget.onRefresh != null){ if(widget.onRefresh != null){
widget.onRefresh!(); widget.onRefresh!();

View File

@ -53,4 +53,28 @@ class DateTool {
String appointmentDate = formatDate(nowDate, [HH,':',nn]); String appointmentDate = formatDate(nowDate, [HH,':',nn]);
return appointmentDate; return appointmentDate;
} }
///
bool compareTimeIsOvertime(int endTiem){
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(endTiem); // DateTime
DateTime now = DateTime.now(); //
if (now.isAfter(dateTime)) {
print('The timestamp is after the current time.');
//
return true;
} else {
print('The timestamp is not after the current time.');
return false;
}
}
/// 1705132260000
int compareTimeGetDaysFromNow(int endTiem){
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(endTiem); // DateTime
DateTime now = DateTime.now(); //
Duration difference = dateTime.difference(now); //
int days = difference.inDays; //
print('dateTime:$dateTime now:$now The difference is $days days.');
return days;
}
} }

View File

@ -0,0 +1,33 @@
import 'package:jpush_flutter/jpush_flutter.dart';
class JPushProvider {
final JPush jpush = JPush();
Future<void> initJPush() async {
jpush.setup(
appKey: "7ff37d174c1a568a89e98dad",
channel: "flutter_channel",
production: false,
debug: true,
);
jpush.applyPushAuthority(const NotificationSettingsIOS(
sound: true,
alert: true,
badge: true,
));
// // Add event handler
// jpush.addEventHandler(
// onReceiveNotification: (Map<String, dynamic> message) {
// print("Receive notification: $message");
// },
// onOpenNotification: (Map<String, dynamic> message) {
// print("Open notification: $message");
// },
// onReceiveMessage: (Map<String, dynamic> message) {
// print("Receive message: $message");
// },
// );
}
}

View File

@ -8,67 +8,61 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
* */ * */
typedef BlockStrCallback = void Function(dynamic textStr); typedef BlockStrCallback = void Function(dynamic textStr);
class LoginInput extends StatelessWidget {
TextEditingController? controller;
List<TextInputFormatter>? inputFormatters;
TextInputType? keyboardType;
Color? background;
String? hintText;
bool? isHaveLeftWidget;
Widget? leftWidget;
String? label;
bool? isPwd;
Widget? rightSlot;
BlockStrCallback? onchangeAction;
LoginInput(
{Key? key,
required this.controller,
this.rightSlot,
this.label,
this.isPwd,
this.inputFormatters,
this.keyboardType,
this.background,
this.hintText,
this.isHaveLeftWidget = true,
this.leftWidget,
this.onchangeAction})
: super(key: key);
@override class LoginInput{
Widget build(BuildContext context) {
return Container( Widget tfInput({
TextEditingController? controller,
List<TextInputFormatter>? inputFormatters,
TextInputType? keyboardType,
Color? background,
String? hintText,
bool? isHaveLeftWidget,
Widget? leftWidget,
String? label,
bool? isPwd,
Widget? rightSlot,
BlockStrCallback? onchangeAction}) {
return SizedBox(
// color: Colors.red, // color: Colors.red,
// width: 1.sp, width: 1.sp,
// height: 200.h, // height: 200.h,
child: Column( child: Column(
children: [ children: [
TextField( Row(
// children: [
maxLines: 1, leftWidget ?? SizedBox(width: 36.w, height: 36.w),
controller: controller, SizedBox(width: 40.w,),
onChanged: onchangeAction, Expanded(
autofocus: false, child: TextField(
inputFormatters:inputFormatters, //
decoration: InputDecoration( maxLines: 1,
// controller: controller,
contentPadding: const EdgeInsets.only( onChanged: onchangeAction,
top: 8.0, left: -19.0, right: -15.0, bottom: 8.0), // autofocus: false,
labelText: label, inputFormatters:inputFormatters,
labelStyle: TextStyle(fontSize: 22.sp), decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 22.sp), //
hintText: hintText, contentPadding: const EdgeInsets.only(
//线 top: 8.0, left: -19.0, right: -15.0, bottom: 8.0),
border: InputBorder.none, labelText: label,
// labelStyle: TextStyle(fontSize: 22.sp),
icon: isHaveLeftWidget == true hintStyle: TextStyle(fontSize: 22.sp),
? leftWidget hintText: hintText,
: SizedBox( //线
width: 20.w, border: InputBorder.none,
height: 40.w, //
), // icon: isHaveLeftWidget == true
), // ? leftWidget
obscureText: isPwd ?? false, // : SizedBox(
// width: 20.w,
// height: 40.w,
// ),
),
obscureText: isPwd ?? false,
),
),
],
), ),
Container( Container(
height: 0.5.h, height: 0.5.h,

View File

@ -1,3 +1,4 @@
/*
import 'dart:io'; import 'dart:io';
import 'package:aliyun_push/aliyun_push.dart'; import 'package:aliyun_push/aliyun_push.dart';
@ -133,3 +134,4 @@ class XSAliyunPushProvider {
if (entity.errorCode!.codeIsSuccessful) {} if (entity.errorCode!.codeIsSuccessful) {}
} }
} }
*/

View File

@ -114,6 +114,7 @@ dependencies:
cached_network_image: ^3.2.0 cached_network_image: ^3.2.0
webview_flutter: ^4.2.3 webview_flutter: ^4.2.3
aliyun_push: ^0.1.6 aliyun_push: ^0.1.6
jpush_flutter: ^2.5.1
#视频播放器 #视频播放器
video_player: ^2.7.1 video_player: ^2.7.1