修复登录uid类型
This commit is contained in:
parent
0a6259607e
commit
4247db112f
@ -191,13 +191,15 @@ class BlueManage {
|
||||
return;
|
||||
}
|
||||
|
||||
// print("33333333333333333333333");
|
||||
/// 用来判断是否返回了连接结果 还是放了一段时间后蓝牙主动断开的
|
||||
var isReturnedConnectResults = false;
|
||||
_currentConnectionStream = _flutterReactiveBle!.connectToDevice(id: connectDeviceMacAddress, connectionTimeout: const Duration(seconds: 5)).listen((connectionStateUpdate) async {
|
||||
// 获取状态
|
||||
deviceConnectionState = connectionStateUpdate.connectionState;
|
||||
stopScan();
|
||||
print('2 deviceConnectionState:$deviceConnectionState connectionStateUpdate.connectionState:${connectionStateUpdate.connectionState}');
|
||||
if (connectionStateUpdate.connectionState == DeviceConnectionState.connected) {
|
||||
isReturnedConnectResults = true;
|
||||
// 如果状态是连接的开始发现服务
|
||||
try {
|
||||
_subScribeToCharacteristic(QualifiedCharacteristic(characteristicId: _characteristicIdSubscription, serviceId: _serviceIdConnect, deviceId: connectDeviceMacAddress));
|
||||
@ -211,9 +213,14 @@ class BlueManage {
|
||||
print('Error occurred when discovering services: $e');
|
||||
rethrow;
|
||||
}
|
||||
} else {
|
||||
} else if (connectionStateUpdate.connectionState == DeviceConnectionState.disconnected) {
|
||||
// 如果状态是断开的
|
||||
deviceConnectionState = connectionStateUpdate.connectionState;
|
||||
connectStateCallBack(deviceConnectionState!);
|
||||
if(isReturnedConnectResults == false){
|
||||
isReturnedConnectResults = true;
|
||||
// 如果是在连接中断开的
|
||||
connectStateCallBack(deviceConnectionState!);
|
||||
}
|
||||
}
|
||||
print('ConnectionState for device $connectDeviceMacAddress : ${connectionStateUpdate.connectionState}');
|
||||
}, onError: (Object e) {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
class LoginData {
|
||||
LoginData({
|
||||
this.accessToken,
|
||||
this.userid,
|
||||
this.expiresAt,
|
||||
this.expiresAtString,
|
||||
this.mobile,
|
||||
this.accessToken,
|
||||
this.userid,
|
||||
this.expiresAt,
|
||||
this.expiresAtString,
|
||||
this.mobile,
|
||||
this.headUrl,
|
||||
this.email,
|
||||
this.nickname,
|
||||
@ -32,7 +32,7 @@ class LoginData {
|
||||
String? email;
|
||||
String? nickname;
|
||||
bool? haveSafeAnswer;
|
||||
String? uid;
|
||||
int? uid;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final map = <String, dynamic>{};
|
||||
|
||||
@ -111,12 +111,16 @@ class AddICCardLogic extends BaseGetXController{
|
||||
//成功
|
||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
||||
// print("添加指纹确认成功,调用添加指纹接口");
|
||||
if(state.cardNumber.value == (reply.data[6]).toString()){
|
||||
return;
|
||||
}else{
|
||||
state.cardNumber.value = (reply.data[6]).toString();
|
||||
}
|
||||
if(state.isCoerced.value == "1"){
|
||||
// 非胁迫
|
||||
int addResultStatus = reply.data[5];
|
||||
if(addResultStatus == 0){
|
||||
// 成功更新序列号
|
||||
state.cardNumber.value = (reply.data[6]).toString();
|
||||
addICCardData();
|
||||
}else if(addResultStatus == 255){
|
||||
// 255 自动退出
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -10,7 +9,6 @@ import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/keySearchWidget.dart';
|
||||
import '../../../../tools/left_slide_actions.dart';
|
||||
import '../../../../tools/noData.dart';
|
||||
@ -243,15 +241,13 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
);
|
||||
}
|
||||
|
||||
void showDeletAlertDialog(
|
||||
BuildContext context,
|
||||
) {
|
||||
void showDeletAlertDialog(BuildContext context) {
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: const Text("提示"),
|
||||
content: const Text('重置后该锁的卡都将被删除哦,确认要重置吗?'),
|
||||
content: const Text('重置后,该锁的卡都将被删除哦,确认要重置吗?'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||
|
||||
@ -62,7 +62,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
|
||||
// 最大图片数
|
||||
state.maxRegCount.value = reply.data[10];
|
||||
|
||||
print("state.maxRegCount.value:${state.maxRegCount.value}");
|
||||
// state.fingerprintNumber.value = reply.data.last.toString();
|
||||
break;
|
||||
case 0x06:
|
||||
@ -130,7 +130,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
|
||||
// 当前注册数
|
||||
state.regIndex.value = reply.data[6];
|
||||
print("state.addFingerprintProcessNumber.value:${state.regIndex.value}");
|
||||
print("state.regIndex.value:${state.regIndex.value}");
|
||||
}
|
||||
break;
|
||||
case 0x06:
|
||||
@ -164,9 +164,14 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
//成功
|
||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
||||
// print("添加指纹确认成功,调用添加指纹接口");
|
||||
if(state.fingerprintNumber.value == (reply.data[6]).toString()){
|
||||
return;
|
||||
}else{
|
||||
state.fingerprintNumber.value = (reply.data[6]).toString();
|
||||
}
|
||||
if(state.isCoerced.value == "1"){
|
||||
// 非胁迫指纹
|
||||
addFingerprintsData(reply.data[6].toString());
|
||||
addFingerprintsData();
|
||||
}else{
|
||||
// 如果是胁迫指纹在 添加完之后以后再调用添加胁迫指纹的
|
||||
senderAddStressFingerprint();
|
||||
@ -203,7 +208,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
//成功
|
||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
||||
// print("添加指纹确认成功,调用添加指纹接口");
|
||||
addFingerprintsData(reply.data[6].toString());
|
||||
addFingerprintsData();
|
||||
break;
|
||||
case 0x06:
|
||||
//需要权限
|
||||
@ -337,13 +342,13 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
// 添加指纹
|
||||
void addFingerprintsData(String fingerprintUserNo) async{
|
||||
void addFingerprintsData() async{
|
||||
var entity = await ApiRepository.to.addFingerprintsData(
|
||||
lockId: state.lockId.value.toString(),
|
||||
endDate: state.endDate.value,
|
||||
addType:state.addType.value,
|
||||
fingerprintName: state.fingerprintName.value,
|
||||
fingerprintNumber: fingerprintUserNo,
|
||||
fingerprintNumber: state.fingerprintNumber.value,
|
||||
fingerprintType: state.fingerprintType.value,
|
||||
isCoerced: state.isCoerced.value,
|
||||
startDate: state.startDate.value,
|
||||
@ -351,16 +356,16 @@ class AddFingerprintLogic extends BaseGetXController {
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
// Toast.show(msg: "添加成功");
|
||||
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString(), fingerprintUserNo);
|
||||
updateFingerprintUserNoLoadData(entity.data!.fingerprintId.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// 更新指纹用户账号
|
||||
void updateFingerprintUserNoLoadData(String fingerprintId, String fingerprintUserNo) async{
|
||||
void updateFingerprintUserNoLoadData(String fingerprintId) async{
|
||||
var entity = await ApiRepository.to.updateFingerprintUserNoLoadData(
|
||||
fingerprintId: fingerprintId,
|
||||
lockId: state.lockId.value.toString(),
|
||||
fingerprintUserNo: fingerprintUserNo,
|
||||
fingerprintUserNo: state.fingerprintNumber.value,
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
Toast.show(msg: "添加成功");
|
||||
|
||||
@ -119,23 +119,28 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
}
|
||||
|
||||
String getIconNumber(int number){
|
||||
String iconPath = "";
|
||||
switch(number){
|
||||
case 0:
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_one.png';
|
||||
break;
|
||||
case 1:
|
||||
return 'images/main/icon_addFingerprint_fingerprint_two.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_two.png';
|
||||
break;
|
||||
case 2:
|
||||
return 'images/main/icon_addFingerprint_fingerprint_three.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_three.png';
|
||||
break;
|
||||
case 3:
|
||||
return 'images/main/icon_addFingerprint_fingerprint_four.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_four.png';
|
||||
break;
|
||||
case 4:
|
||||
return 'images/main/icon_addFingerprint_fingerprint_five.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_five.png';
|
||||
break;
|
||||
default:
|
||||
return 'images/main/icon_addFingerprint_fingerprint_one.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_four.png';
|
||||
break;
|
||||
}
|
||||
return iconPath;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -8,6 +8,8 @@ class AddFingerprintState{
|
||||
var maxRegCount = 0.obs;// 最大注册次数
|
||||
var regIndex = 0.obs;// 当前注册次数
|
||||
|
||||
var fingerprintNumber = "".obs;
|
||||
|
||||
final lockId = 0.obs;
|
||||
final endDate = "".obs;
|
||||
final addType = "".obs;
|
||||
|
||||
@ -250,7 +250,7 @@ class _FingerprintListPageState extends State<FingerprintListPage> with RouteAwa
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: const Text("提示"),
|
||||
content: const Text('重置后,改为该锁的指纹都将被删除哦,确认要重置吗?'),
|
||||
content: const Text('重置后,该锁的指纹都将被删除哦,确认要重置吗?'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||
|
||||
@ -269,6 +269,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(isShowBlueConnetctToast: false, action: (){
|
||||
dismissEasyLoading();
|
||||
print("1111111");
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
});
|
||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (DeviceConnectionState connectionState) async {
|
||||
@ -297,7 +298,10 @@ class LockSetLogic extends BaseGetXController {
|
||||
} else if (connectionState == DeviceConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
print("222222");
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -307,6 +311,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
showEasyLoading();
|
||||
showBlueConnetctToastTimer(isShowBlueConnetctToast: false, action: (){
|
||||
dismissEasyLoading();
|
||||
print("333333");
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
});
|
||||
BlueManage().bludSendData(BlueManage().connectDeviceName, (DeviceConnectionState connectionState) async {
|
||||
@ -331,7 +336,10 @@ class LockSetLogic extends BaseGetXController {
|
||||
} else if (connectionState == DeviceConnectionState.disconnected) {
|
||||
dismissEasyLoading();
|
||||
cancelBlueConnetctToastTimer();
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
print("444444");
|
||||
if(state.ifCurrentScreen.value == true){
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -539,7 +547,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
state.deletWaitScanCompleter = Completer();
|
||||
state.deletWaitScanTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
//定时任务
|
||||
if(index >= 5){
|
||||
if(index >= 7){
|
||||
// 当超过10秒的时候还是没有搜索到,完成任务,关闭扫描,取消定时器,弹窗提示
|
||||
if(state.deletWaitScanTimer != null){
|
||||
state.deletWaitScanTimer!.cancel();
|
||||
@ -549,6 +557,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
}
|
||||
BlueManage().stopScan();
|
||||
dismissEasyLoading();
|
||||
print("555555");
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
}else{
|
||||
// 每秒判断获取是否搜到了当前设备
|
||||
@ -596,6 +605,7 @@ class LockSetLogic extends BaseGetXController {
|
||||
}
|
||||
}else if(state.currentDeviceUUid.value[31] == "0"){
|
||||
// 未配对 表示这把锁已被强制初始化 处于可添加状态 直接弹窗删除即可
|
||||
print("666666");
|
||||
showDeletAlertTipDialog(Get.context!);
|
||||
}
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: const Text("提示"),
|
||||
content: const Text('创建公司号,考勤功能才能使用'),
|
||||
content: const Text('创建公司后,考勤功能才能使用'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||
|
||||
@ -415,18 +415,29 @@ class LockDetailLogic extends BaseGetXController {
|
||||
// state.animationController.reset();
|
||||
// state.animationController.forward();
|
||||
});
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
print("openDoorTokenPubToken:$getTokenList getPrivateKeyList:$getPrivateKeyList");
|
||||
// List<int>listData = await IoSenderManage.senderOpenLock(
|
||||
// keyID: BlueManage().connectDeviceName,
|
||||
// userID: await Storage.getUid(),
|
||||
// openMode: openMode,
|
||||
// openTime: DateTime.now().millisecondsSinceEpoch ~/ 1000,
|
||||
// onlineToken: state.lockNetToken,
|
||||
// token: getTokenList,
|
||||
// needAuthor: 1,
|
||||
// signKey: signKeyDataList,
|
||||
// privateKey: getPrivateKeyList,
|
||||
// );
|
||||
BlueManage().bludSendData(state.keyInfos.value.bluetooth!.bluetoothDeviceName!, (DeviceConnectionState deviceConnectionState) async {
|
||||
if (deviceConnectionState == DeviceConnectionState.connected){
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
print("openDoorTokenPubToken:$getTokenList getPrivateKeyList:$getPrivateKeyList");
|
||||
IoSenderManage.senderOpenLock(
|
||||
keyID: BlueManage().connectDeviceName,
|
||||
userID: await Storage.getUid(),
|
||||
|
||||
@ -38,9 +38,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
Get.log("LockDetailPage initState1111");
|
||||
|
||||
print("LockDetailPage isOnlyOneData==${widget.isOnlyOneData}");
|
||||
state.keyInfos.value = widget.lockListInfoItemEntity;
|
||||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||||
print("state.lockUserNo==${state.lockUserNo}");
|
||||
state.senderUserId = state.keyInfos.value.senderUserId!;
|
||||
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
|
||||
state.isOpenLockNeedOnline.value =
|
||||
@ -48,8 +51,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
|
||||
state.isOpenPassageMode.value = state.keyInfos.value.passageMode!;
|
||||
|
||||
BlueManage().connectDeviceName =
|
||||
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
||||
BlueManage().connectDeviceName = state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
||||
|
||||
List<int> publicKeyData =
|
||||
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
|
||||
@ -611,14 +613,13 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
// state.animationController.forward();
|
||||
// state.animationController.dispose();
|
||||
super.dispose();
|
||||
BlueManage().disconnect(BlueManage().connectDeviceMacAddress);
|
||||
}
|
||||
|
||||
/// 从上级界面进入 当前界面即将出现
|
||||
@override
|
||||
void didPush() {
|
||||
super.didPush();
|
||||
// print("LockDetailPage===didPush");
|
||||
print("LockDetailPage===didPush");
|
||||
state.ifCurrentScreen.value = true;
|
||||
}
|
||||
|
||||
@ -626,10 +627,11 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
@override
|
||||
void didPop() {
|
||||
super.didPop();
|
||||
// print("LockDetailPage===didPop");
|
||||
print("LockDetailPage===didPop");
|
||||
state.ifCurrentScreen.value = false;
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
BlueManage().stopScan();
|
||||
BlueManage().disconnect(BlueManage().connectDeviceMacAddress);
|
||||
state.openLockBtnState.value = 0;
|
||||
state.animationController.reset();
|
||||
state.animationController.forward();
|
||||
@ -641,14 +643,14 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
void didPopNext() {
|
||||
super.didPopNext();
|
||||
state.ifCurrentScreen.value = true;
|
||||
// print("LockDetailPage===didPopNext");
|
||||
print("LockDetailPage===didPopNext");
|
||||
}
|
||||
|
||||
/// 进入下级界面 当前界面即将消失
|
||||
@override
|
||||
void didPushNext() {
|
||||
super.didPushNext();
|
||||
// print("LockDetailPage===didPushNext");
|
||||
print("LockDetailPage===didPushNext");
|
||||
state.ifCurrentScreen.value = false;
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
BlueManage().stopScan();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
// import 'package:flutter_pickers/pickers.dart';
|
||||
// import 'package:flutter_pickers/time_picker/model/date_mode.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -269,24 +270,35 @@ class _AddRemoteControlPageState extends State<AddRemoteControlPage> {
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
height: 65.h,
|
||||
width: 300.w,
|
||||
padding: EdgeInsets.only(top: 5.h),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
FilteringTextInputFormatter.deny('\n'),
|
||||
LengthLimitingTextInputFormatter(18),
|
||||
],
|
||||
controller: state.nameController,
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
// contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
hintText: tfStr,
|
||||
hintStyle: TextStyle(fontSize: 24.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
focusedBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
disabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
enabledBorder: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 0),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -6,6 +6,7 @@ import 'package:get/get.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/keySearchWidget.dart';
|
||||
import '../../../../tools/noData.dart';
|
||||
import '../../../../tools/showIosTipView.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
@ -54,7 +55,12 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> {
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_searchWidget(),
|
||||
KeySearchWidget(
|
||||
editingController: state.searchController,
|
||||
onSubmittedAction: () {
|
||||
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
@ -100,50 +106,6 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> {
|
||||
// return title;
|
||||
// }
|
||||
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
controller: state.searchController,
|
||||
autofocus: false,
|
||||
onChanged: (value) {
|
||||
print("onChanged:$value");
|
||||
},
|
||||
onEditingComplete: () {
|
||||
print("onEditingComplete:");
|
||||
},
|
||||
onSubmitted: (value) {
|
||||
// 调用遥控列表
|
||||
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildMainUI() {
|
||||
String typeImgName = 'images/icon_card.png';
|
||||
|
||||
@ -252,7 +214,7 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> {
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: const Text("提示"),
|
||||
content: const Text('重置后信息都会清除哦,确认要重置吗?'),
|
||||
content: const Text('重置后遥控信息都会清除哦,确认要重置吗?'),
|
||||
actions: [
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||
|
||||
@ -38,7 +38,7 @@ class _AbountPageState extends State<AbountPage> {
|
||||
),
|
||||
SizedBox(height: 20.h),
|
||||
Text(
|
||||
"星锁 1.0.0.04(preRelease-20240108-1)",
|
||||
"星锁 1.0.0.06(preRelease-20240115)",
|
||||
style: TextStyle(fontSize: 24.sp, color: AppColors.blackColor),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -4,6 +4,7 @@ import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -157,6 +158,8 @@ class _NearbyLockPageState extends State<NearbyLockPage> with RouteAware {
|
||||
super.didPop();
|
||||
Get.log("NearbyLockLogic didPop()");
|
||||
|
||||
EasyLoading.isShow ? EasyLoading.dismiss() : null;
|
||||
|
||||
state.ifCurrentScreen.value = false;
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
logic.stopScanBlueList();
|
||||
|
||||
@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
version: 1.0.0+6
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user