fix提测问题:指纹添加成功后,指纹图标异常问题
This commit is contained in:
parent
ea23b0657d
commit
3feba32a08
BIN
images/main/icon_addFingerprint_fingerprint_six.png
Normal file
BIN
images/main/icon_addFingerprint_fingerprint_six.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 308 KiB |
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -17,7 +16,8 @@ class AddFingerprintPage extends StatefulWidget {
|
|||||||
State<AddFingerprintPage> createState() => _AddFingerprintPageState();
|
State<AddFingerprintPage> createState() => _AddFingerprintPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware {
|
class _AddFingerprintPageState extends State<AddFingerprintPage>
|
||||||
|
with RouteAware {
|
||||||
final logic = Get.put(AddFingerprintLogic());
|
final logic = Get.put(AddFingerprintLogic());
|
||||||
final state = Get.find<AddFingerprintLogic>().state;
|
final state = Get.find<AddFingerprintLogic>().state;
|
||||||
|
|
||||||
@ -26,7 +26,8 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.fingerprint!.tr}",
|
barTitle:
|
||||||
|
"${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.fingerprint!.tr}",
|
||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor),
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView(
|
body: ListView(
|
||||||
@ -35,62 +36,66 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
height: 50.h,
|
height: 50.h,
|
||||||
),
|
),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible:logic.state.ifConnectScuess.value,
|
visible: logic.state.ifConnectScuess.value,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Row(
|
||||||
child: Text(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
"请将您的手指按下".tr,
|
children: [
|
||||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
Expanded(
|
||||||
textAlign: TextAlign.center,
|
child: Text(
|
||||||
maxLines:null,
|
"请将您的手指按下".tr,
|
||||||
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
),
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: null,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
|
Text(
|
||||||
|
"(${state.regIndex.value}/${state.maxRegCount.value})",
|
||||||
|
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: null,
|
||||||
|
style: TextStyle(fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Text(
|
|
||||||
"(${state.regIndex.value}/${state.maxRegCount.value})",
|
|
||||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
maxLines:null,
|
|
||||||
style: TextStyle(fontSize: 24.sp),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
Obx(() => Visibility(
|
|
||||||
visible:!logic.state.ifConnectScuess.value,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
"尝试连接设备...".tr,
|
|
||||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
maxLines:null,
|
|
||||||
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
)),
|
||||||
),
|
Obx(() => Visibility(
|
||||||
)),
|
visible: !logic.state.ifConnectScuess.value,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"尝试连接设备...".tr,
|
||||||
|
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
maxLines: null,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
),
|
),
|
||||||
Obx(() => Image.asset(
|
Obx(
|
||||||
getIconNumber(state.regIndex.value),
|
() => Image.asset(
|
||||||
width: 185.w,
|
getIconNumber(state.regIndex.value),
|
||||||
height: 295.h,
|
width: 185.w,
|
||||||
),),
|
height: 295.h,
|
||||||
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 120.h,
|
height: 120.h,
|
||||||
),
|
),
|
||||||
@ -104,7 +109,7 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
"根据提示,抬起手指后再进行下一次指纹采集".tr,
|
"根据提示,抬起手指后再进行下一次指纹采集".tr,
|
||||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines:null,
|
maxLines: null,
|
||||||
style: TextStyle(fontSize: 24.sp),
|
style: TextStyle(fontSize: 24.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -116,9 +121,9 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String getIconNumber(int number){
|
String getIconNumber(int number) {
|
||||||
String iconPath = "";
|
String iconPath = "";
|
||||||
switch(number){
|
switch (number) {
|
||||||
case 0:
|
case 0:
|
||||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_one.png';
|
iconPath = 'images/main/icon_addFingerprint_fingerprint_one.png';
|
||||||
break;
|
break;
|
||||||
@ -134,8 +139,11 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
case 4:
|
case 4:
|
||||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_five.png';
|
iconPath = 'images/main/icon_addFingerprint_fingerprint_five.png';
|
||||||
break;
|
break;
|
||||||
|
case 5:
|
||||||
|
iconPath = 'images/main/icon_addFingerprint_fingerprint_six.png';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_four.png';
|
iconPath = 'images/main/icon_addFingerprint_fingerprint_six.png';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return iconPath;
|
return iconPath;
|
||||||
@ -172,7 +180,7 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
logic.cancelBlueConnetctToastTimer();
|
logic.cancelBlueConnetctToastTimer();
|
||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
|
|
||||||
if(state.ifAddState.value){
|
if (state.ifAddState.value) {
|
||||||
logic.senderCancelAddFingerprintCommand();
|
logic.senderCancelAddFingerprintCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -192,5 +200,4 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
|||||||
|
|
||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user