升级flutter版本3.19.6
This commit is contained in:
parent
19221dc666
commit
6daf8a45f0
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
|
|
||||||
import '../../../../tools/commonDataManage.dart';
|
import '../../../../tools/commonDataManage.dart';
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ class AddICCardState{ // 0永久 1显示 2循环
|
|||||||
cardNumber.value = map['cardNumber'];
|
cardNumber.value = map['cardNumber'];
|
||||||
cardType.value = map['cardType'];
|
cardType.value = map['cardType'];
|
||||||
isCoerced.value = map['isCoerced'];
|
isCoerced.value = map['isCoerced'];
|
||||||
|
AppLog.log('1111-isCoerced.value:${isCoerced.value}');
|
||||||
isAdministrator.value = map['isAdministrator'];
|
isAdministrator.value = map['isAdministrator'];
|
||||||
startDate.value = map['startDate'];
|
startDate.value = map['startDate'];
|
||||||
weekDay.value = map['weekDay'];
|
weekDay.value = map['weekDay'];
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import 'dart:async';
|
|||||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||||
|
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||||
|
import 'package:star_lock/main/lockDetail/face/addFace/addFace_entity.dart';
|
||||||
import 'package:star_lock/main/lockDetail/face/addFace/addFace_state.dart';
|
import 'package:star_lock/main/lockDetail/face/addFace/addFace_state.dart';
|
||||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||||
|
|
||||||
@ -23,7 +25,7 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
// 添加人脸开始
|
// 添加人脸开始
|
||||||
if (reply is SenderAddFaceReply && state.ifCurrentScreen.value == true) {
|
if (reply is SenderAddFaceReply && state.ifCurrentScreen.value == true) {
|
||||||
_replyAddFaceBegin(reply);
|
_replyAddFaceBegin(reply);
|
||||||
@ -42,7 +44,7 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _replyAddFaceBegin(Reply reply) async {
|
Future<void> _replyAddFaceBegin(Reply reply) async {
|
||||||
int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
@ -55,25 +57,25 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
//无权限
|
//无权限
|
||||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var token = reply.data.sublist(5, 9);
|
final List<int> token = reply.data.sublist(5, 9);
|
||||||
var saveStrList = changeIntListToStringList(token);
|
final List<String> saveStrList = changeIntListToStringList(token);
|
||||||
Storage.setStringList(saveBlueToken, saveStrList);
|
Storage.setStringList(saveBlueToken, saveStrList);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID:"1",
|
keyID:'1',
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
faceNo:0,
|
faceNo:0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit:0xffff,
|
||||||
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == '2' ? 1 : 0, // 是否是胁迫
|
||||||
isAdmin: state.isAdministrator.value == "2" ? 1 : 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
operate: 0,
|
operate: 0,
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
||||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
@ -89,7 +91,7 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
default:
|
default:
|
||||||
//失败
|
//失败
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
showToast("添加人脸失败", something: (){
|
showToast('添加人脸失败', something: (){
|
||||||
Get.back();
|
Get.back();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -97,38 +99,38 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _replyAddFaceProcess(Reply reply) async {
|
Future<void> _replyAddFaceProcess(Reply reply) async {
|
||||||
int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
switch(reply.data[5]){
|
switch(reply.data[5]){
|
||||||
case 0xff:
|
case 0xff:
|
||||||
// 注册人脸失败
|
// 注册人脸失败
|
||||||
showToast("退出添加".tr);
|
showToast('退出添加'.tr);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFE:
|
case 0xFE:
|
||||||
// 管理员已满
|
// 管理员已满
|
||||||
showToast("管理员已满".tr);
|
showToast('管理员已满'.tr);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFD:
|
case 0xFD:
|
||||||
// 用户已满
|
// 用户已满
|
||||||
showToast("用户已满".tr);
|
showToast('用户已满'.tr);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFC:
|
case 0xFC:
|
||||||
// 指纹已满
|
// 指纹已满
|
||||||
showToast("锁上面添加人脸已满".tr);
|
showToast('锁上面添加人脸已满'.tr);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
Get.close(1);
|
Get.close(1);
|
||||||
break;
|
break;
|
||||||
case 0xFB:
|
case 0xFB:
|
||||||
// 指纹已存在
|
// 指纹已存在
|
||||||
showToast("人脸已存在".tr);
|
showToast('人脸已存在'.tr);
|
||||||
state.ifAddState.value = false;
|
state.ifAddState.value = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -159,12 +161,12 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _replyAddFaceConfirmation(Reply reply) async {
|
Future<void> _replyAddFaceConfirmation(Reply reply) async {
|
||||||
int status = reply.data[2];
|
final int status = reply.data[2];
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
var faceList = reply.data.sublist(reply.data.length - 2);
|
final List<int> faceList = reply.data.sublist(reply.data.length - 2);
|
||||||
var faceNumber = listChangInt(faceList).toString();
|
final String faceNumber = listChangInt(faceList).toString();
|
||||||
// var faceNumber = listChangInt(reply.data.sublist(6, 7)).toString();
|
// var faceNumber = listChangInt(reply.data.sublist(6, 7)).toString();
|
||||||
// if (state.faceNumber.value == (reply.data[6]).toString()) {
|
// if (state.faceNumber.value == (reply.data[6]).toString()) {
|
||||||
if (state.faceNumber.value == faceNumber) {
|
if (state.faceNumber.value == faceNumber) {
|
||||||
@ -192,24 +194,24 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
if (deviceConnectionState == BluetoothConnectionState.connected) {
|
||||||
cancelBlueConnetctToastTimer();
|
cancelBlueConnetctToastTimer();
|
||||||
|
|
||||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFaceCommand(
|
IoSenderManage.senderAddFaceCommand(
|
||||||
keyID:"1",
|
keyID:'1',
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
faceNo:0,
|
faceNo:0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit:0xffff,
|
||||||
isForce:state.isCoerced.value == "2" ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == '2' ? 1 : 0, // 是否是胁迫
|
||||||
isAdmin: state.isAdministrator.value == "2" ? 1 : 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
operate: 0,
|
operate: 0,
|
||||||
isRound:state.selectType.value == "2" ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
||||||
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
weekRound:DateTool().accordingTheCycleIntoTheCorrespondingNumber(state.weekDay.value), // 周循环
|
||||||
startDate: int.parse(state.startDate.value)~/1000,
|
startDate: int.parse(state.startDate.value)~/1000,
|
||||||
endDate: int.parse(state.endDate.value)~/1000,
|
endDate: int.parse(state.endDate.value)~/1000,
|
||||||
@ -235,17 +237,17 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
Future<void> senderCancelAddFaceCommand() async {
|
Future<void> senderCancelAddFaceCommand() async {
|
||||||
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
BlueManage().blueSendData(BlueManage().connectDeviceName, (BluetoothConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == BluetoothConnectionState.connected){
|
if (deviceConnectionState == BluetoothConnectionState.connected){
|
||||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||||
|
|
||||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||||
|
|
||||||
var token = await Storage.getStringList(saveBlueToken);
|
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderCancelAddFaceCommand(
|
IoSenderManage.senderCancelAddFaceCommand(
|
||||||
keyID:"1",
|
keyID:'1',
|
||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
needAuthor:1,
|
needAuthor:1,
|
||||||
signKey:signKeyDataList,
|
signKey:signKeyDataList,
|
||||||
@ -263,8 +265,8 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 添加人脸
|
// 添加人脸
|
||||||
void addFaceData() async {
|
Future<void> addFaceData() async {
|
||||||
var entity = await ApiRepository.to.addFaceData(
|
final AddFaceEntity entity = await ApiRepository.to.addFaceData(
|
||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
faceName: state.faceName.value,
|
faceName: state.faceName.value,
|
||||||
faceNumber: state.faceNumber.value,
|
faceNumber: state.faceNumber.value,
|
||||||
@ -276,7 +278,7 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
weekDay: state.weekDay.value,
|
weekDay: state.weekDay.value,
|
||||||
startTime: int.parse(state.effectiveDateTime.value),
|
startTime: int.parse(state.effectiveDateTime.value),
|
||||||
endTime: int.parse(state.failureDateTime.value),
|
endTime: int.parse(state.failureDateTime.value),
|
||||||
faceRight: state.isAdministrator.value == "2" ? 1 : 0,
|
faceRight: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
@ -286,14 +288,14 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新人脸用户账号
|
// 更新人脸用户账号
|
||||||
void updateFaceUserNoLoadData(int faceId) async {
|
Future<void> updateFaceUserNoLoadData(int faceId) async {
|
||||||
var entity = await ApiRepository.to.updateFaceUserNo(
|
final LoginEntity entity = await ApiRepository.to.updateFaceUserNo(
|
||||||
faceId: faceId,
|
faceId: faceId,
|
||||||
lockId: state.lockId.value,
|
lockId: state.lockId.value,
|
||||||
faceUserNo: state.faceNumber.value,
|
faceUserNo: state.faceNumber.value,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
showToast("添加成功");
|
showToast('添加成功');
|
||||||
if (state.fromType.value == 2) {
|
if (state.fromType.value == 2) {
|
||||||
// 回调人脸号
|
// 回调人脸号
|
||||||
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(
|
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(
|
||||||
@ -307,7 +309,6 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
@ -315,7 +316,6 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
|
||||||
super.onInit();
|
super.onInit();
|
||||||
//开始添加后发送指令
|
//开始添加后发送指令
|
||||||
// senderAddFace();
|
// senderAddFace();
|
||||||
@ -323,7 +323,6 @@ class AddFaceLogic extends BaseGetXController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
|
||||||
super.onClose();
|
super.onClose();
|
||||||
|
|
||||||
_replySubscription.cancel();
|
_replySubscription.cancel();
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
fingerNo:0,
|
fingerNo:0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit:0xffff,
|
||||||
isForce:state.isCoerced.value == '2' ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == '1' ? 1 : 0, // 是否是胁迫
|
||||||
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
operate: 0,
|
operate: 0,
|
||||||
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
||||||
@ -203,7 +203,7 @@ class AddFingerprintLogic extends BaseGetXController {
|
|||||||
userID:await Storage.getUid(),
|
userID:await Storage.getUid(),
|
||||||
fingerNo:0,
|
fingerNo:0,
|
||||||
useCountLimit:0xffff,
|
useCountLimit:0xffff,
|
||||||
isForce:state.isCoerced.value == '2' ? 1 : 0, // 是否是胁迫
|
isForce:state.isCoerced.value == '1' ? 1 : 0, // 是否是胁迫
|
||||||
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
isAdmin: state.isAdministrator.value == '2' ? 1 : 0,
|
||||||
operate: 0,
|
operate: 0,
|
||||||
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
isRound:state.selectType.value == '2' ? 1: 0, // 是否是循环
|
||||||
|
|||||||
@ -3,50 +3,49 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
|
|
||||||
class AddFingerprintState{
|
class AddFingerprintState{
|
||||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
|
||||||
var ifAddState = false.obs;// 是否是添加状态,如果是添加状态,返回上级界面发送取消添加指令
|
|
||||||
|
|
||||||
var ifConnectScuess = false.obs;
|
|
||||||
var maxRegCount = 0.obs;// 最大注册次数
|
|
||||||
var regIndex = 0.obs;// 当前注册次数
|
|
||||||
|
|
||||||
var fingerprintNumber = "".obs;
|
|
||||||
|
|
||||||
final lockId = 0.obs;
|
|
||||||
final endDate = "".obs;
|
|
||||||
final addType = "".obs;
|
|
||||||
final fingerprintName = "".obs;
|
|
||||||
final fingerprintType = "".obs;
|
|
||||||
final isCoerced = "".obs;
|
|
||||||
final isAdministrator = "".obs;
|
|
||||||
final startDate = "".obs;
|
|
||||||
final weekDay = [].obs;
|
|
||||||
final fromType = 1.obs;
|
|
||||||
final effectiveDateTime = "".obs; // 生效时间
|
|
||||||
final failureDateTime = "".obs; // 失效时间
|
|
||||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
|
||||||
|
|
||||||
AddFingerprintState() {
|
AddFingerprintState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
lockId.value = map["lockId"];
|
lockId.value = map['lockId'];
|
||||||
addType.value = map["addType"];
|
addType.value = map['addType'];
|
||||||
fingerprintName.value = map["fingerprintName"];
|
fingerprintName.value = map['fingerprintName'];
|
||||||
fingerprintType.value = map["fingerprintType"];
|
fingerprintType.value = map['fingerprintType'];
|
||||||
isCoerced.value = map["isCoerced"];
|
isCoerced.value = map['isCoerced'];
|
||||||
isAdministrator.value = map["isAdministrator"];
|
isAdministrator.value = map['isAdministrator'];
|
||||||
startDate.value = map["startDate"];
|
startDate.value = map['startDate'];
|
||||||
lockId.value = map["lockId"];
|
lockId.value = map['lockId'];
|
||||||
weekDay.value = map["weekDay"];
|
weekDay.value = map['weekDay'];
|
||||||
fromType.value = map["fromType"];
|
fromType.value = map['fromType'];
|
||||||
effectiveDateTime.value = map["effectiveTime"];
|
effectiveDateTime.value = map['effectiveTime'];
|
||||||
failureDateTime.value = map["failureTime"];
|
failureDateTime.value = map['failureTime'];
|
||||||
selectType.value = map["selectType"];
|
selectType.value = map['selectType'];
|
||||||
//循环类型下,结束时间加一天
|
//循环类型下,结束时间加一天
|
||||||
if (selectType.value == '2') {
|
if (selectType.value == '2') {
|
||||||
endDate.value =
|
endDate.value =
|
||||||
"${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
"${int.parse(map["endDate"]) + CommonDataManage().dayLatestTime}";
|
||||||
} else {
|
} else {
|
||||||
endDate.value = map["endDate"];
|
endDate.value = map['endDate'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||||
|
RxBool ifAddState = false.obs;// 是否是添加状态,如果是添加状态,返回上级界面发送取消添加指令
|
||||||
|
|
||||||
|
RxBool ifConnectScuess = false.obs;
|
||||||
|
RxInt maxRegCount = 0.obs;// 最大注册次数
|
||||||
|
RxInt regIndex = 0.obs;// 当前注册次数
|
||||||
|
|
||||||
|
RxString fingerprintNumber = ''.obs;
|
||||||
|
|
||||||
|
final RxInt lockId = 0.obs;
|
||||||
|
final RxString endDate = ''.obs;
|
||||||
|
final RxString addType = ''.obs;
|
||||||
|
final RxString fingerprintName = ''.obs;
|
||||||
|
final RxString fingerprintType = ''.obs;
|
||||||
|
final RxString isCoerced = ''.obs;
|
||||||
|
final RxString isAdministrator = ''.obs;
|
||||||
|
final RxString startDate = ''.obs;
|
||||||
|
final RxList weekDay = [].obs;
|
||||||
|
final RxInt fromType = 1.obs;
|
||||||
|
final RxString effectiveDateTime = ''.obs; // 生效时间
|
||||||
|
final RxString failureDateTime = ''.obs; // 失效时间
|
||||||
|
final RxString selectType = '0'.obs;// 0永久 1显示 2循环
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
@ -10,31 +11,31 @@ class AddFingerprintTypeLogic extends BaseGetXController{
|
|||||||
AddFingerprintState state = AddFingerprintState();
|
AddFingerprintState state = AddFingerprintState();
|
||||||
|
|
||||||
// 添加指纹
|
// 添加指纹
|
||||||
void addFingerprintsData() async {
|
Future<void> addFingerprintsData() async {
|
||||||
var fingerprintType = 0; // 永久:1;限时2,单次3,循环:4
|
int fingerprintType = 0; // 永久:1;限时2,单次3,循环:4
|
||||||
var startDate = "";
|
String startDate = '';
|
||||||
var endDate = "";
|
String endDate = '';
|
||||||
var startTime = "";
|
String startTime = '';
|
||||||
var endTime = "";
|
String endTime = '';
|
||||||
if (state.selectType.value == "0") {
|
if (state.selectType.value == '0') {
|
||||||
fingerprintType = 1;
|
fingerprintType = 1;
|
||||||
startDate = "0";
|
startDate = '0';
|
||||||
endDate = "0";
|
endDate = '0';
|
||||||
startTime = "0";
|
startTime = '0';
|
||||||
endTime = "0";
|
endTime = '0';
|
||||||
} else if (state.selectType.value == "1") {
|
} else if (state.selectType.value == '1') {
|
||||||
fingerprintType = 2;
|
fingerprintType = 2;
|
||||||
startDate = DateTool().dateToTimestamp(state.timeLimitBeginTime.value, 1).toString();
|
startDate = DateTool().dateToTimestamp(state.timeLimitBeginTime.value, 1).toString();
|
||||||
endDate = DateTool().dateToTimestamp(state.timeLimitEndTime.value, 1).toString();
|
endDate = DateTool().dateToTimestamp(state.timeLimitEndTime.value, 1).toString();
|
||||||
startTime = "0";
|
startTime = '0';
|
||||||
endTime = "0";
|
endTime = '0';
|
||||||
|
|
||||||
if (startDate.isEmpty) {
|
if (startDate.isEmpty) {
|
||||||
showToast("请选择开始时间".tr);
|
showToast('请选择开始时间'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (endDate.isEmpty) {
|
if (endDate.isEmpty) {
|
||||||
showToast("请选择结束时间".tr);
|
showToast('请选择结束时间'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,12 +45,12 @@ class AddFingerprintTypeLogic extends BaseGetXController{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (int.parse(startDate) >= int.parse(endDate)) {
|
if (int.parse(startDate) >= int.parse(endDate)) {
|
||||||
showToast("失效时间要大于生效时间".tr);
|
showToast('失效时间要大于生效时间'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (state.selectType.value == "2") {
|
} else if (state.selectType.value == '2') {
|
||||||
if (state.cycleBeginTime.value.isEmpty) {
|
if (state.cycleBeginTime.value.isEmpty) {
|
||||||
showToast("请选择有效期".tr);
|
showToast('请选择有效期'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
startDate = DateTool().dateToTimestamp(state.cycleBeginTime.value, 1).toString();
|
startDate = DateTool().dateToTimestamp(state.cycleBeginTime.value, 1).toString();
|
||||||
@ -61,27 +62,27 @@ class AddFingerprintTypeLogic extends BaseGetXController{
|
|||||||
// var isCoerced = state.isStressFingerprint.value == false ? "1" : "2"; // 1:非胁迫指纹 2:胁迫指纹
|
// var isCoerced = state.isStressFingerprint.value == false ? "1" : "2"; // 1:非胁迫指纹 2:胁迫指纹
|
||||||
|
|
||||||
// 指纹
|
// 指纹
|
||||||
Get.toNamed(Routers.addFingerprintPage, arguments: {
|
Get.toNamed(Routers.addFingerprintPage, arguments: <String, Object>{
|
||||||
"lockId": state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
"endDate": endDate,
|
'endDate': endDate,
|
||||||
"addType": "1",
|
'addType': '1',
|
||||||
"fingerprintName": state.nameController.text,
|
'fingerprintName': state.nameController.text,
|
||||||
"fingerprintNumber": "123456",
|
'fingerprintNumber': '123456',
|
||||||
"fingerprintType": fingerprintType.toString(),
|
'fingerprintType': fingerprintType.toString(),
|
||||||
"isCoerced": state.isStressFingerprint.value == false ? "1" : "2", // 1:非胁迫指纹 2:胁迫指纹
|
'isCoerced': state.isStressFingerprint.value == false ? '1' : '2', // 1:非胁迫指纹 2:胁迫指纹
|
||||||
"startDate": startDate,
|
'startDate': startDate,
|
||||||
"weekDay": state.weekdaysList.value,
|
'weekDay': state.weekdaysList.value,
|
||||||
"fromType": state.fromType.value,
|
'fromType': state.fromType.value,
|
||||||
"isAdministrator": state.isAdministrator.value == false ? "1" : "2", // 1:不是管理员 2:是管理员
|
'isAdministrator': state.isAdministrator.value == false ? '1' : '2', // 1:不是管理员 2:是管理员
|
||||||
"effectiveTime": startTime,
|
'effectiveTime': startTime,
|
||||||
"failureTime": endTime,
|
'failureTime': endTime,
|
||||||
"selectType": state.selectType.value,
|
'selectType': state.selectType.value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 校验指纹名字是否重复
|
// 校验指纹名字是否重复
|
||||||
void checkFingerprintNameDuplicated(String fingerprintName) async{
|
Future<void> checkFingerprintNameDuplicated(String fingerprintName) async{
|
||||||
var entity = await ApiRepository.to.checkFingerprintNameDuplicatedData(
|
final LoginEntity entity = await ApiRepository.to.checkFingerprintNameDuplicatedData(
|
||||||
lockId: state.lockId.value.toString(),
|
lockId: state.lockId.value.toString(),
|
||||||
fingerprintName: fingerprintName,
|
fingerprintName: fingerprintName,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,6 +3,7 @@ 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/main/lockDetail/fingerprint/addFingerprintSelectType/addFingerprintType_state.dart';
|
||||||
import 'package:star_lock/tools/commonDataManage.dart';
|
import 'package:star_lock/tools/commonDataManage.dart';
|
||||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||||
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||||
@ -27,12 +28,11 @@ class AddFingerprintTypePage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with SingleTickerProviderStateMixin{
|
class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with SingleTickerProviderStateMixin{
|
||||||
final logic = Get.put(AddFingerprintTypeLogic());
|
final AddFingerprintTypeLogic logic = Get.put(AddFingerprintTypeLogic());
|
||||||
final state = Get.find<AddFingerprintTypeLogic>().state;
|
final AddFingerprintState state = Get.find<AddFingerprintTypeLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
state.tabController = TabController(
|
state.tabController = TabController(
|
||||||
@ -60,7 +60,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
_tabBar(),
|
_tabBar(),
|
||||||
_pageWidget(),
|
_pageWidget(),
|
||||||
],
|
],
|
||||||
@ -76,7 +76,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
// return sendElectronicKeySucceed();
|
// return sendElectronicKeySucceed();
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
perpetualKeyWidget(
|
perpetualKeyWidget(
|
||||||
TranslationLoader.lanKeys!.name!.tr,
|
TranslationLoader.lanKeys!.name!.tr,
|
||||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||||
@ -91,7 +91,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
// 限时
|
// 限时
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
perpetualKeyWidget(
|
perpetualKeyWidget(
|
||||||
TranslationLoader.lanKeys!.name!.tr,
|
TranslationLoader.lanKeys!.name!.tr,
|
||||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||||
@ -107,7 +107,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
// 循环
|
// 循环
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
perpetualKeyWidget(
|
perpetualKeyWidget(
|
||||||
TranslationLoader.lanKeys!.name!.tr,
|
TranslationLoader.lanKeys!.name!.tr,
|
||||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||||
@ -128,10 +128,10 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
Widget perpetualKeyWidget(
|
Widget perpetualKeyWidget(
|
||||||
String titleStr, String rightTitle, TextEditingController controller) {
|
String titleStr, String rightTitle, TextEditingController controller) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: titleStr,
|
leftTitel: titleStr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: getTFWidget(rightTitle)),
|
rightWidget: getTFWidget(rightTitle)),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
@ -142,7 +142,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
// 限时顶部选择日期
|
// 限时顶部选择日期
|
||||||
Widget keyTimeLimitWidget() {
|
Widget keyTimeLimitWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||||
rightTitle: state.timeLimitBeginTime.value,
|
rightTitle: state.timeLimitBeginTime.value,
|
||||||
@ -152,7 +152,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
PDuration selectDate =
|
PDuration selectDate =
|
||||||
PDuration.parse(DateTime.tryParse(state.timeLimitBeginTime.value));
|
PDuration.parse(DateTime.tryParse(state.timeLimitBeginTime.value));
|
||||||
Pickers.showDatePicker(context,selectDate:selectDate, mode: DateMode.YMDHM,
|
Pickers.showDatePicker(context,selectDate:selectDate, mode: DateMode.YMDHM,
|
||||||
onConfirm: (p) {
|
onConfirm: (PDuration p) {
|
||||||
state.timeLimitBeginTime.value = DateTool().getYMDHNDateString(p, 1);
|
state.timeLimitBeginTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
@ -164,7 +164,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
PDuration selectDate =
|
PDuration selectDate =
|
||||||
PDuration.parse(DateTime.tryParse(state.timeLimitEndTime.value));
|
PDuration.parse(DateTime.tryParse(state.timeLimitEndTime.value));
|
||||||
Pickers.showDatePicker(context,selectDate:selectDate, mode: DateMode.YMDHM,
|
Pickers.showDatePicker(context,selectDate:selectDate, mode: DateMode.YMDHM,
|
||||||
onConfirm: (p) {
|
onConfirm: (PDuration p) {
|
||||||
state.timeLimitEndTime.value = DateTool().getYMDHNDateString(p, 1);
|
state.timeLimitEndTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
@ -176,14 +176,14 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
// 循环顶部选择日期
|
// 循环顶部选择日期
|
||||||
Widget keyCyclicDate() {
|
Widget keyCyclicDate() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||||
rightTitle:"${state.cycleBeginTime.value}\n${state.cycleEndTime.value}",
|
rightTitle:'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||||
'validityValue': state.weekdaysList.value,
|
'validityValue': state.weekdaysList.value,
|
||||||
'starDate': state.cycleBeginTime.value,
|
'starDate': state.cycleBeginTime.value,
|
||||||
'endDate': state.cycleEndTime.value,
|
'endDate': state.cycleEndTime.value,
|
||||||
@ -199,14 +199,14 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.weekdaysList.isNotEmpty ? true : false,
|
visible: state.weekdaysList.isNotEmpty,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "有效日".tr,
|
leftTitel: '有效日'.tr,
|
||||||
rightTitle: state.weekdaysList.value.join(",").toString(),
|
rightTitle: state.weekdaysList.value.join(',').toString(),
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||||
'validityValue': state.weekdaysList.value,
|
'validityValue': state.weekdaysList.value,
|
||||||
'starDate': state.cycleBeginTime.value,
|
'starDate': state.cycleBeginTime.value,
|
||||||
'endDate': state.cycleEndTime.value,
|
'endDate': state.cycleEndTime.value,
|
||||||
@ -224,11 +224,11 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.effectiveDateTime.value.isNotEmpty,
|
visible: state.effectiveDateTime.value.isNotEmpty,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "有效时间".tr,
|
leftTitel: '有效时间'.tr,
|
||||||
rightTitle: "${state.effectiveDateTime.value}-${state.failureDateTime.value}",
|
rightTitle: '${state.effectiveDateTime.value}-${state.failureDateTime.value}',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||||
'validityValue': state.weekdaysList.value,
|
'validityValue': state.weekdaysList.value,
|
||||||
'starDate': state.cycleBeginTime.value,
|
'starDate': state.cycleBeginTime.value,
|
||||||
'endDate': state.cycleEndTime.value,
|
'endDate': state.cycleEndTime.value,
|
||||||
@ -249,14 +249,12 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
|
|
||||||
Widget keyBottomWidget() {
|
Widget keyBottomWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1,
|
||||||
? true
|
|
||||||
: false,
|
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: "是否为管理员".tr,
|
leftTitel: '是否为管理员'.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget:
|
rightWidget:
|
||||||
@ -264,7 +262,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.stressFingerprint!.tr,
|
leftTitel: TranslationLoader.lanKeys!.stressFingerprint!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isTipsImg: false,
|
isTipsImg: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: SizedBox(
|
rightWidget: SizedBox(
|
||||||
@ -282,16 +280,16 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
if (state.nameController.text.isEmpty) {
|
if (state.nameController.text.isEmpty) {
|
||||||
logic.showToast("请输入姓名".tr);
|
logic.showToast('请输入姓名'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logic.checkFingerprintNameDuplicated(state.nameController.text);
|
logic.checkFingerprintNameDuplicated(state.nameController.text);
|
||||||
} else {
|
} else {
|
||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
logic.showToast("演示模式".tr);
|
logic.showToast('演示模式'.tr);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -378,7 +376,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
@ -423,7 +421,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isStressFingerprint.value,
|
value: state.isStressFingerprint.value,
|
||||||
onChanged: (value) {
|
onChanged: (bool value) {
|
||||||
state.isStressFingerprint.value = value;
|
state.isStressFingerprint.value = value;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -436,27 +434,27 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
|||||||
trackColor: CupertinoColors.systemGrey5,
|
trackColor: CupertinoColors.systemGrey5,
|
||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAdministrator.value,
|
value: state.isAdministrator.value,
|
||||||
onChanged: (value) {
|
onChanged: (bool value) {
|
||||||
state.isAdministrator.value = value;
|
state.isAdministrator.value = value;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<ItemView> _itemTabs = <ItemView>[
|
final List<ItemView> _itemTabs = <ItemView>[
|
||||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"),
|
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'),
|
||||||
];
|
];
|
||||||
|
|
||||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||||
];
|
];
|
||||||
|
|
||||||
TabBar _tabBar() {
|
TabBar _tabBar() {
|
||||||
return TabBar(
|
return TabBar(
|
||||||
controller: state.tabController,
|
controller: state.tabController,
|
||||||
onTap: (index) {
|
onTap: (int index) {
|
||||||
FocusScope.of(context).requestFocus(FocusNode());
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
},
|
},
|
||||||
tabs: state.fromType.value == 1 ? _itemTabs.map((ItemView item) => _tab(item)).toList() : _fromCheckInTypeItemTabs.map((ItemView item) => _tab(item)).toList(),
|
tabs: state.fromType.value == 1 ? _itemTabs.map((ItemView item) => _tab(item)).toList() : _fromCheckInTypeItemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||||
|
|||||||
@ -1,38 +1,39 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../../../tools/dateTool.dart';
|
import '../../../../tools/dateTool.dart';
|
||||||
|
|
||||||
class AddFingerprintState {
|
class AddFingerprintState {
|
||||||
final lockId = 0.obs;
|
|
||||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
|
||||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
|
||||||
final isStressFingerprint = false.obs;
|
|
||||||
final isAdministrator = false.obs; // 是否为管理员
|
|
||||||
|
|
||||||
var timeLimitBeginTime = DateTool()
|
|
||||||
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
|
||||||
.obs; // 限时开始时间
|
|
||||||
var timeLimitEndTime = DateTool()
|
|
||||||
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
|
||||||
.obs; // 限时结束时间
|
|
||||||
var cycleBeginTime = "".obs; // 循环开始时间
|
|
||||||
var cycleEndTime = "".obs; // 循环结束时间
|
|
||||||
var effectiveDateTime = "".obs; // 生效时间
|
|
||||||
var failureDateTime = "".obs; // 失效时间
|
|
||||||
var weekdaysList = [].obs;
|
|
||||||
var fromTypeTwoStaffName = "".obs; // 从添加员工进入 传入员工名字
|
|
||||||
|
|
||||||
final TextEditingController nameController = TextEditingController();
|
|
||||||
late TabController tabController;
|
|
||||||
AddFingerprintState() {
|
AddFingerprintState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
lockId.value = map["lockId"];
|
lockId.value = map['lockId'];
|
||||||
fromType.value = map["fromType"];
|
fromType.value = map['fromType'];
|
||||||
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
// 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
if (fromType.value == 2) {
|
if (fromType.value == 2) {
|
||||||
fromTypeTwoStaffName.value =
|
fromTypeTwoStaffName.value =
|
||||||
map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
map['fromTypeTwoStaffName']; // 从添加员工进入 传入员工名字
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
final RxInt lockId = 0.obs;
|
||||||
|
final RxString selectType = '0'.obs; // 0永久 1显示 2循环
|
||||||
|
final RxInt fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
|
final RxBool isStressFingerprint = false.obs;
|
||||||
|
final RxBool isAdministrator = false.obs; // 是否为管理员
|
||||||
|
|
||||||
|
RxString timeLimitBeginTime = DateTool()
|
||||||
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时开始时间
|
||||||
|
RxString timeLimitEndTime = DateTool()
|
||||||
|
.dateToYMDHNString(DateTime.now().millisecondsSinceEpoch.toString())
|
||||||
|
.obs; // 限时结束时间
|
||||||
|
RxString cycleBeginTime = ''.obs; // 循环开始时间
|
||||||
|
RxString cycleEndTime = ''.obs; // 循环结束时间
|
||||||
|
RxString effectiveDateTime = ''.obs; // 生效时间
|
||||||
|
RxString failureDateTime = ''.obs; // 失效时间
|
||||||
|
RxList weekdaysList = [].obs;
|
||||||
|
RxString fromTypeTwoStaffName = ''.obs; // 从添加员工进入 传入员工名字
|
||||||
|
|
||||||
|
final TextEditingController nameController = TextEditingController();
|
||||||
|
late TabController tabController;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:flutter_native_contact_picker/flutter_native_contact_picker.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/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_logic.dart';
|
||||||
|
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_state.dart';
|
||||||
import 'package:star_lock/tools/submitBtn.dart';
|
import 'package:star_lock/tools/submitBtn.dart';
|
||||||
|
|
||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
@ -21,8 +22,8 @@ class RecipientInformationPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||||
final logic = Get.put(RecipientInformationLogic());
|
final RecipientInformationLogic logic = Get.put(RecipientInformationLogic());
|
||||||
final state = Get.find<RecipientInformationLogic>().state;
|
final RecipientInformationState state = Get.find<RecipientInformationLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -35,7 +36,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(height: 150.h, child: _buildMainUI()),
|
SizedBox(height: 150.h, child: _buildMainUI()),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
_buildAccoutRow(),
|
_buildAccoutRow(),
|
||||||
@ -43,7 +44,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
_buildNextBtn(context),
|
_buildNextBtn(context),
|
||||||
SizedBox(height: 64.h),
|
SizedBox(height: 64.h),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: state.isFromType.value == 1 ? true : false,
|
visible: state.isFromType.value == 1,
|
||||||
child: _buildRemoveBadLockBtn()),
|
child: _buildRemoveBadLockBtn()),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 64.h,
|
height: 64.h,
|
||||||
@ -55,12 +56,12 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
|
|
||||||
Widget _buildMainUI() {
|
Widget _buildMainUI() {
|
||||||
return Obx(() => Column(
|
return Obx(() => Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
_electronicKeyItem(
|
_electronicKeyItem(
|
||||||
state.type.value == 1
|
state.type.value == 1
|
||||||
? 'images/select_circle.png'
|
? 'images/select_circle.png'
|
||||||
: 'images/normal_circle.png',
|
: 'images/normal_circle.png',
|
||||||
"个人用户", () {
|
'个人用户', () {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.type.value = 1;
|
state.type.value = 1;
|
||||||
});
|
});
|
||||||
@ -69,7 +70,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
state.type.value == 2
|
state.type.value == 2
|
||||||
? 'images/select_circle.png'
|
? 'images/select_circle.png'
|
||||||
: 'images/normal_circle.png',
|
: 'images/normal_circle.png',
|
||||||
"星寓", () {
|
'星寓', () {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.type.value = 2;
|
state.type.value = 2;
|
||||||
});
|
});
|
||||||
@ -88,7 +89,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40.w,
|
width: 40.w,
|
||||||
),
|
),
|
||||||
@ -117,9 +118,9 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
// height: 60.h,
|
// height: 60.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40.w,
|
width: 40.w,
|
||||||
),
|
),
|
||||||
@ -131,11 +132,11 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
controller: state.numberController,
|
controller: state.numberController,
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.text,
|
||||||
onChanged: (value) {},
|
onChanged: (String value) {},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText:
|
hintText:
|
||||||
state.type.value == 1 ? "请输入手机号或email" : "请输入星寓管理员的账号",
|
state.type.value == 1 ? '请输入手机号或email' : '请输入星寓管理员的账号',
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: AppColors.placeholderTextColor,
|
color: AppColors.placeholderTextColor,
|
||||||
fontSize: ScreenUtil().setSp(22),
|
fontSize: ScreenUtil().setSp(22),
|
||||||
@ -152,7 +153,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
if (currentContact.phoneNumbers!.isNotEmpty) {
|
if (currentContact.phoneNumbers!.isNotEmpty) {
|
||||||
state.numberController.text = currentContact
|
state.numberController.text = currentContact
|
||||||
.phoneNumbers![0]
|
.phoneNumbers![0]
|
||||||
.replaceAll(RegExp(r"\s+\b|\b\s"), "");
|
.replaceAll(RegExp(r'\s+\b|\b\s'), '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
@ -174,7 +175,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
),
|
),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||||
rightTitle: "",
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
@ -185,7 +186,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||||
),
|
),
|
||||||
action: () async {
|
action: () async {
|
||||||
var result = await Navigator.pushNamed(
|
Object? result = await Navigator.pushNamed(
|
||||||
context, Routers.selectCountryRegionPage);
|
context, Routers.selectCountryRegionPage);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
result as Map<String, dynamic>;
|
result as Map<String, dynamic>;
|
||||||
@ -217,17 +218,17 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
btnName: '下一步',
|
btnName: '下一步',
|
||||||
onClick: () {
|
onClick: () {
|
||||||
if (state.numberController.text.isEmpty) {
|
if (state.numberController.text.isEmpty) {
|
||||||
logic.showToast("请输入手机号或email");
|
logic.showToast('请输入手机号或email');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state.isFromType.value == 1) {
|
if (state.isFromType.value == 1) {
|
||||||
// 转移智能锁
|
// 转移智能锁
|
||||||
if (state.type.value == 1) {
|
if (state.type.value == 1) {
|
||||||
logic.transferLockConfirmInfoData((v) {
|
logic.transferLockConfirmInfoData((RecipientInformationData v) {
|
||||||
showCupertinoAlertDialog(context, v);
|
showCupertinoAlertDialog(context, v);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logic.showToast("暂不支持跨平台转移,敬请期待");
|
logic.showToast('暂不支持跨平台转移,敬请期待');
|
||||||
// Get.toNamed(Routers.selectBranchPage, arguments: {
|
// Get.toNamed(Routers.selectBranchPage, arguments: {
|
||||||
// "idList": state.idList.value,
|
// "idList": state.idList.value,
|
||||||
// "countryCode": state.countryCode.value,
|
// "countryCode": state.countryCode.value,
|
||||||
@ -238,11 +239,11 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
} else {
|
} else {
|
||||||
// 转移网关
|
// 转移网关
|
||||||
if (state.type.value == 1) {
|
if (state.type.value == 1) {
|
||||||
logic.transferGateWayConfirmInfoData((v) {
|
logic.transferGateWayConfirmInfoData((RecipientInformationData v) {
|
||||||
showCupertinoAlertDialog(context, v);
|
showCupertinoAlertDialog(context, v);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logic.showToast("暂不支持跨平台转移,敬请期待");
|
logic.showToast('暂不支持跨平台转移,敬请期待');
|
||||||
|
|
||||||
// Get.toNamed(Routers.selectBranchPage, arguments: {
|
// Get.toNamed(Routers.selectBranchPage, arguments: {
|
||||||
// "idList": state.idList.value,
|
// "idList": state.idList.value,
|
||||||
@ -257,12 +258,10 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
|
|
||||||
Widget _buildRemoveBadLockBtn() {
|
Widget _buildRemoveBadLockBtn() {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: <Widget>[
|
||||||
const Expanded(child: SizedBox()),
|
const Expanded(child: SizedBox()),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: logic.showDeletAlertDialog,
|
||||||
logic.showDeletAlertDialog();
|
|
||||||
},
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'移除坏锁',
|
'移除坏锁',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -298,9 +297,9 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
height: 400.h,
|
height: 400.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: <Widget>[
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
Text("转移确认", style: TextStyle(fontSize: 24.sp)),
|
Text('转移确认', style: TextStyle(fontSize: 24.sp)),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
Image.asset('images/icon_lockGroup_item.png',
|
Image.asset('images/icon_lockGroup_item.png',
|
||||||
width: 70.h, height: 70.h, fit: BoxFit.fill),
|
width: 70.h, height: 70.h, fit: BoxFit.fill),
|
||||||
@ -318,7 +317,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
width: 80.w,
|
width: 80.w,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(state.type.value == 1 ? "个人用户" : "星寓",
|
child: Text(state.type.value == 1 ? '个人用户' : '星寓',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.sp, color: Colors.white))),
|
fontSize: 18.sp, color: Colors.white))),
|
||||||
),
|
),
|
||||||
@ -329,19 +328,16 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
Text(recipientInformationData.userid!,
|
Text(recipientInformationData.userid!,
|
||||||
style: TextStyle(fontSize: 22.sp)),
|
style: TextStyle(fontSize: 22.sp)),
|
||||||
SizedBox(height: 8.h),
|
SizedBox(height: 8.h),
|
||||||
Text("本次共转移${state.idList.value.length}把智能锁",
|
Text('本次共转移${state.idList.value.length}把智能锁',
|
||||||
style: TextStyle(fontSize: 20.sp)),
|
style: TextStyle(fontSize: 20.sp)),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: <Widget>[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: Get.back,
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
onPrimary: AppColors.appBarIconColor,
|
foregroundColor: AppColors.appBarIconColor, backgroundColor: Colors.grey,
|
||||||
backgroundColor: Colors.grey,
|
|
||||||
minimumSize: Size(110.w, 45.h),
|
minimumSize: Size(110.w, 45.h),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
@ -362,8 +358,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
onPrimary: AppColors.appBarIconColor,
|
foregroundColor: AppColors.appBarIconColor, backgroundColor: AppColors.mainColor,
|
||||||
backgroundColor: AppColors.mainColor,
|
|
||||||
minimumSize: Size(110.w, 45.h),
|
minimumSize: Size(110.w, 45.h),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
|
|||||||
@ -189,12 +189,9 @@ class _SelectBranchPageState extends State<SelectBranchPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: Get.back,
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
onPrimary: AppColors.appBarIconColor,
|
foregroundColor: AppColors.appBarIconColor, backgroundColor: Colors.grey,
|
||||||
backgroundColor: Colors.grey,
|
|
||||||
minimumSize: Size(110.w, 45.h),
|
minimumSize: Size(110.w, 45.h),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
@ -204,13 +201,9 @@ class _SelectBranchPageState extends State<SelectBranchPage> {
|
|||||||
child: Text('取消'.tr, style: TextStyle(fontSize: 22.sp)),
|
child: Text('取消'.tr, style: TextStyle(fontSize: 22.sp)),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: Get.back,
|
||||||
Get.back();
|
|
||||||
// logic.transferLockInfoData();
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
onPrimary: AppColors.appBarIconColor,
|
foregroundColor: AppColors.appBarIconColor, backgroundColor: AppColors.mainColor,
|
||||||
backgroundColor: AppColors.mainColor,
|
|
||||||
minimumSize: Size(110.w, 45.h),
|
minimumSize: Size(110.w, 45.h),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
|
|||||||
@ -165,7 +165,7 @@ dependencies:
|
|||||||
|
|
||||||
#网络图片缓存
|
#网络图片缓存
|
||||||
cached_network_image: ^3.2.0
|
cached_network_image: ^3.2.0
|
||||||
webview_flutter: 4.5.0
|
webview_flutter: ^4.4.2
|
||||||
|
|
||||||
jpush_flutter: ^2.5.1
|
jpush_flutter: ^2.5.1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user