1、修复安卓低版本手机扫描蓝牙慢、开锁慢的情况
2、修复遥控、掌静脉添加问题
This commit is contained in:
parent
577a056e53
commit
1aa818402b
BIN
ios/.DS_Store
vendored
BIN
ios/.DS_Store
vendored
Binary file not shown.
24
ios/Podfile.lock
Executable file → Normal file
24
ios/Podfile.lock
Executable file → Normal file
@ -116,13 +116,13 @@ PODS:
|
|||||||
- image_picker_ios (0.0.1):
|
- image_picker_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- ios-voice-processor (1.1.0)
|
- ios-voice-processor (1.1.0)
|
||||||
- JCore (4.4.0)
|
- JCore (4.6.2)
|
||||||
- JPush (5.2.0):
|
- JPush (5.3.0):
|
||||||
- JCore (>= 2.0.0)
|
- JCore (>= 2.0.0)
|
||||||
- jpush_flutter (0.0.2):
|
- jpush_flutter (0.0.2):
|
||||||
- Flutter
|
- Flutter
|
||||||
- JCore (= 4.4.0)
|
- JCore (>= 4.6.2)
|
||||||
- JPush (= 5.2.0)
|
- JPush (= 5.3.0)
|
||||||
- just_audio (0.0.1):
|
- just_audio (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- network_info_plus (0.0.1):
|
- network_info_plus (0.0.1):
|
||||||
@ -323,7 +323,7 @@ SPEC CHECKSUMS:
|
|||||||
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
||||||
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
||||||
Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31
|
Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31
|
||||||
camera_avfoundation: 759172d1a77ae7be0de08fc104cfb79738b8a59e
|
camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
|
||||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||||
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
|
||||||
DKImagePickerController: 0a24ebfe7b48beeb74c27531540aaa2cc1dac6cf
|
DKImagePickerController: 0a24ebfe7b48beeb74c27531540aaa2cc1dac6cf
|
||||||
@ -337,16 +337,16 @@ SPEC CHECKSUMS:
|
|||||||
flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907
|
flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907
|
||||||
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
|
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
|
||||||
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
|
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
|
||||||
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
|
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
|
||||||
fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849
|
fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849
|
||||||
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
|
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
|
||||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||||
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
|
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
|
||||||
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
|
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
|
||||||
JCore: 05f0f3489672ea3fa55338bae4866224bc092b1f
|
JCore: 024c73b04e110b496e93d8c127ea9cd1ed934e4c
|
||||||
JPush: 76668b765fcfd7c15f86b05ca0e5cdc01945ce23
|
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
|
||||||
jpush_flutter: 1f436f1a02db5c5ef9e9b42378f557096ccd328b
|
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
|
||||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||||
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
|
||||||
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
|
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
|
||||||
@ -362,9 +362,9 @@ SPEC CHECKSUMS:
|
|||||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
|
||||||
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
|
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
|
||||||
|
|
||||||
PODFILE CHECKSUM: 317f9473a5705c6fe4d79d95e81676f248048fdc
|
PODFILE CHECKSUM: 317f9473a5705c6fe4d79d95e81676f248048fdc
|
||||||
|
|
||||||
COCOAPODS: 1.14.3
|
COCOAPODS: 1.15.2
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_settings.dart';
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
@ -10,7 +11,6 @@ import 'io_tool/io_model.dart';
|
|||||||
import 'io_tool/io_tool.dart';
|
import 'io_tool/io_tool.dart';
|
||||||
import 'io_tool/manager_event_bus.dart';
|
import 'io_tool/manager_event_bus.dart';
|
||||||
import 'reciver_data.dart';
|
import 'reciver_data.dart';
|
||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
|
||||||
|
|
||||||
//连接状态回调
|
//连接状态回调
|
||||||
typedef ConnectStateCallBack = Function(
|
typedef ConnectStateCallBack = Function(
|
||||||
@ -62,7 +62,7 @@ class BlueManage {
|
|||||||
BluetoothConnectionState? bluetoothConnectionState =
|
BluetoothConnectionState? bluetoothConnectionState =
|
||||||
BluetoothConnectionState.disconnected;
|
BluetoothConnectionState.disconnected;
|
||||||
|
|
||||||
BluetoothAdapterState? _adapterState = BluetoothAdapterState.unknown;
|
BluetoothAdapterState? _adapterState = BluetoothAdapterState.on;
|
||||||
StreamSubscription<BluetoothAdapterState>? _adapterStateStateSubscription;
|
StreamSubscription<BluetoothAdapterState>? _adapterStateStateSubscription;
|
||||||
|
|
||||||
// 听上报来的数据,参数来自前面扫描到的结果
|
// 听上报来的数据,参数来自前面扫描到的结果
|
||||||
@ -99,6 +99,7 @@ class BlueManage {
|
|||||||
void _initAdapterStateStateSubscription() {
|
void _initAdapterStateStateSubscription() {
|
||||||
_adapterStateStateSubscription ??=
|
_adapterStateStateSubscription ??=
|
||||||
FlutterBluePlus.adapterState.listen((BluetoothAdapterState state) {
|
FlutterBluePlus.adapterState.listen((BluetoothAdapterState state) {
|
||||||
|
AppLog.log('蓝牙状态:$state');
|
||||||
_adapterState = state;
|
_adapterState = state;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -144,6 +145,7 @@ class BlueManage {
|
|||||||
final DateTime start = DateTime.now();
|
final DateTime start = DateTime.now();
|
||||||
FlutterBluePlus.isSupported.then((bool isAvailable) async {
|
FlutterBluePlus.isSupported.then((bool isAvailable) async {
|
||||||
if (isAvailable) {
|
if (isAvailable) {
|
||||||
|
// AppLog.log('startScanSingle 蓝牙状态 系统蓝牙状态:$_adapterState 蓝牙连接状态:$bluetoothConnectionState');
|
||||||
if (_adapterState == BluetoothAdapterState.on) {
|
if (_adapterState == BluetoothAdapterState.on) {
|
||||||
try {
|
try {
|
||||||
//android 扫描比较慢,取样只要 3 分之一
|
//android 扫描比较慢,取样只要 3 分之一
|
||||||
@ -221,13 +223,14 @@ class BlueManage {
|
|||||||
{List<Guid>? idList}) async {
|
{List<Guid>? idList}) async {
|
||||||
FlutterBluePlus.isSupported.then((bool isAvailable) async {
|
FlutterBluePlus.isSupported.then((bool isAvailable) async {
|
||||||
if (isAvailable) {
|
if (isAvailable) {
|
||||||
|
// AppLog.log('startScan 蓝牙状态 系统蓝牙状态:$_adapterState 蓝牙连接状态:$bluetoothConnectionState');
|
||||||
if (_adapterState == BluetoothAdapterState.on) {
|
if (_adapterState == BluetoothAdapterState.on) {
|
||||||
try {
|
try {
|
||||||
FlutterBluePlus.startScan(timeout: Duration(seconds: timeout));
|
FlutterBluePlus.startScan(timeout: Duration(seconds: timeout));
|
||||||
final StreamSubscription<List<ScanResult>> subscription =
|
final StreamSubscription<List<ScanResult>> subscription = FlutterBluePlus.scanResults.listen((List<ScanResult> results) {
|
||||||
FlutterBluePlus.scanResults.listen((List<ScanResult> results) {
|
|
||||||
scanDevices.clear();
|
scanDevices.clear();
|
||||||
for (final ScanResult scanResult in results) {
|
for (final ScanResult scanResult in results) {
|
||||||
|
// AppLog.log('扫描到的设备:${scanResult.device.platformName} ${scanResult.advertisementData.advName} ${scanResult.rssi}');
|
||||||
// 判断名字为空的直接剔除
|
// 判断名字为空的直接剔除
|
||||||
if (((scanResult.advertisementData.serviceUuids.isNotEmpty
|
if (((scanResult.advertisementData.serviceUuids.isNotEmpty
|
||||||
? scanResult.advertisementData.serviceUuids[0]
|
? scanResult.advertisementData.serviceUuids[0]
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class AddICCardPage extends StatefulWidget {
|
|||||||
State<AddICCardPage> createState() => _AddICCardPageState();
|
State<AddICCardPage> createState() => _AddICCardPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AddICCardPageState extends State<AddICCardPage> with RouteAware {
|
class _AddICCardPageState extends State<AddICCardPage> with RouteAware {
|
||||||
final AddICCardLogic logic = Get.put(AddICCardLogic());
|
final AddICCardLogic logic = Get.put(AddICCardLogic());
|
||||||
final AddICCardState state = Get.find<AddICCardLogic>().state;
|
final AddICCardState state = Get.find<AddICCardLogic>().state;
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import '../../../../../tools/dateTool.dart';
|
|||||||
import '../../../../../tools/submitBtn.dart';
|
import '../../../../../tools/submitBtn.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../../translations/trans_lib.dart';
|
import '../../../../../translations/trans_lib.dart';
|
||||||
|
import '../../../../lockMian/lockMain/lockMain_logic.dart';
|
||||||
import '../../lockSet/lockSetInfo_entity.dart';
|
import '../../lockSet/lockSetInfo_entity.dart';
|
||||||
import 'uploadElectricQuantity_logic.dart';
|
import 'uploadElectricQuantity_logic.dart';
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池1".tr}:${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantity ?? ""}%",
|
"${"电池1".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantity ?? ""}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -68,7 +69,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池2".tr}:${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantityStandby ?? ""}%",
|
"${"电池2".tr}${TranslationLoader.lanKeys!.electricQuantity!.tr}:${state.lockBasicInfo.value.electricQuantityStandby ?? ""}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -80,7 +81,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电量更新时间".tr}:${DateTool().dateToYMDHNString(state.uploadElectricQuantityDate.value.toString())}",
|
"${"电量更新时间".tr}:${state.uploadElectricQuantityDate.value == 0 ? "-" : DateTool().dateToYMDHNString(state.uploadElectricQuantityDate.value.toString())}",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -94,7 +95,11 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
fontSize: 32.sp,
|
fontSize: 32.sp,
|
||||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () {
|
onClick: () async {
|
||||||
|
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
logic.getStarLockStatus();
|
logic.getStarLockStatus();
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import '../../../../tools/appRouteObserver.dart';
|
|||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||||
import 'burglarAlarm_logic.dart';
|
import 'burglarAlarm_logic.dart';
|
||||||
|
|
||||||
class BurglarAlarmPage extends StatefulWidget {
|
class BurglarAlarmPage extends StatefulWidget {
|
||||||
@ -52,7 +53,7 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.burglarAlarmEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
|
'${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.burglarAlarmEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}',
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
|
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
|
||||||
)),
|
)),
|
||||||
@ -67,8 +68,12 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
|||||||
fontSize: 32.sp,
|
fontSize: 32.sp,
|
||||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () {
|
onClick: () async {
|
||||||
logic.sendBurglarAlarm();
|
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||||
|
if (!isNetWork) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
logic.sendBurglarAlarm();
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -123,7 +123,7 @@ class AddPalmLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 0xFC:
|
case 0xFC:
|
||||||
// 指纹已满
|
// 指纹已满
|
||||||
showToast('锁上面添加卡已满'.tr);
|
showToast('锁上面添加掌静脉已满'.tr);
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFB:
|
case 0xFB:
|
||||||
@ -192,7 +192,7 @@ class AddPalmLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 取消添加指纹
|
// 取消添加指纹
|
||||||
Future<void> senderCancelAddCardCommand() async {
|
Future<void> senderCancelAddPalmCommand() async {
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected){
|
if (deviceConnectionState == BluetoothConnectionState.connected){
|
||||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import 'package:star_lock/main/lockDetail/palm/addPalm/addPalm_state.dart';
|
|||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/submitBtn.dart';
|
import '../../../../../tools/submitBtn.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../../tools/appRouteObserver.dart';
|
||||||
|
|
||||||
class AddPalmPage extends StatefulWidget {
|
class AddPalmPage extends StatefulWidget {
|
||||||
const AddPalmPage({Key? key}) : super(key: key);
|
const AddPalmPage({Key? key}) : super(key: key);
|
||||||
@ -15,7 +16,7 @@ class AddPalmPage extends StatefulWidget {
|
|||||||
State<AddPalmPage> createState() => _AddPalmPageState();
|
State<AddPalmPage> createState() => _AddPalmPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AddPalmPageState extends State<AddPalmPage> {
|
class _AddPalmPageState extends State<AddPalmPage> with RouteAware{
|
||||||
final AddPalmLogic logic = Get.put(AddPalmLogic());
|
final AddPalmLogic logic = Get.put(AddPalmLogic());
|
||||||
final AddPalmState state = Get.find<AddPalmLogic>().state;
|
final AddPalmState state = Get.find<AddPalmLogic>().state;
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ class _AddPalmPageState extends State<AddPalmPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: '添加手掌',
|
barTitle: '添加掌静脉',
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
@ -100,4 +101,54 @@ class _AddPalmPageState extends State<AddPalmPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
|
||||||
|
/// 路由订阅
|
||||||
|
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
/// 取消路由订阅
|
||||||
|
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 从上级界面进入 当前界面即将出现
|
||||||
|
@override
|
||||||
|
void didPush() {
|
||||||
|
super.didPush();
|
||||||
|
state.ifCurrentScreen.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 返回上一个界面 当前界面即将消失
|
||||||
|
@override
|
||||||
|
void didPop() {
|
||||||
|
super.didPop();
|
||||||
|
logic.cancelBlueConnetctToastTimer();
|
||||||
|
state.ifCurrentScreen.value = false;
|
||||||
|
|
||||||
|
if(state.ifAddState.value){
|
||||||
|
logic.senderCancelAddPalmCommand();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 从下级返回 当前界面即将出现
|
||||||
|
@override
|
||||||
|
void didPopNext() {
|
||||||
|
super.didPopNext();
|
||||||
|
state.ifCurrentScreen.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 进入下级界面 当前界面即将消失
|
||||||
|
@override
|
||||||
|
void didPushNext() {
|
||||||
|
super.didPushNext();
|
||||||
|
logic.cancelBlueConnetctToastTimer();
|
||||||
|
|
||||||
|
state.ifCurrentScreen.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,14 +34,14 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: '手掌详情',
|
barTitle: '掌静脉详情',
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: '手掌号',
|
leftTitel: '掌静脉号',
|
||||||
rightTitle: state.typeNumber.value,
|
rightTitle: state.typeNumber.value,
|
||||||
isHaveDirection: false,
|
isHaveDirection: false,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
|
|||||||
@ -122,7 +122,7 @@ class AddRemoteControlLogic extends BaseGetXController{
|
|||||||
break;
|
break;
|
||||||
case 0xFC:
|
case 0xFC:
|
||||||
// 遥控已满
|
// 遥控已满
|
||||||
showToast('锁上面添加卡已满'.tr);
|
showToast('锁上面遥控已满'.tr);
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFB:
|
case 0xFB:
|
||||||
|
|||||||
@ -4,6 +4,13 @@ import 'package:get/get.dart';
|
|||||||
import '../minePersonInfoPage/minePersonInfo_entity.dart';
|
import '../minePersonInfoPage/minePersonInfo_entity.dart';
|
||||||
|
|
||||||
class MinePersonInfoEditNamePageState {
|
class MinePersonInfoEditNamePageState {
|
||||||
|
|
||||||
|
MinePersonInfoEditNamePageState() {
|
||||||
|
Map map = Get.arguments;
|
||||||
|
mineInfoData.value = map['mineInfoData'];
|
||||||
|
nickNameController.text = mineInfoData.value.nickname ?? '';
|
||||||
|
inputNickName.value = mineInfoData.value.nickname ?? '';
|
||||||
|
}
|
||||||
final mineInfoData = MinePersonInfoData().obs;
|
final mineInfoData = MinePersonInfoData().obs;
|
||||||
|
|
||||||
final TextEditingController nickNameController = TextEditingController();
|
final TextEditingController nickNameController = TextEditingController();
|
||||||
@ -11,11 +18,4 @@ class MinePersonInfoEditNamePageState {
|
|||||||
final inputNickName = ''.obs;
|
final inputNickName = ''.obs;
|
||||||
var canSub = false.obs;
|
var canSub = false.obs;
|
||||||
bool get nickNameIsOK => inputNickName.value.isNotEmpty;
|
bool get nickNameIsOK => inputNickName.value.isNotEmpty;
|
||||||
|
|
||||||
MinePersonInfoEditNamePageState() {
|
|
||||||
Map map = Get.arguments;
|
|
||||||
mineInfoData.value = map["mineInfoData"];
|
|
||||||
nickNameController.text = mineInfoData.value.nickname!;
|
|
||||||
inputNickName.value = mineInfoData.value.nickname!;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user