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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -17,7 +16,8 @@ class AddFingerprintPage extends StatefulWidget {
|
||||
State<AddFingerprintPage> createState() => _AddFingerprintPageState();
|
||||
}
|
||||
|
||||
class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware {
|
||||
class _AddFingerprintPageState extends State<AddFingerprintPage>
|
||||
with RouteAware {
|
||||
final logic = Get.put(AddFingerprintLogic());
|
||||
final state = Get.find<AddFingerprintLogic>().state;
|
||||
|
||||
@ -26,7 +26,8 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.fingerprint!.tr}",
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.addTip!.tr}${TranslationLoader.lanKeys!.fingerprint!.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
@ -35,62 +36,66 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
height: 50.h,
|
||||
),
|
||||
Obx(() => Visibility(
|
||||
visible:logic.state.ifConnectScuess.value,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
visible: logic.state.ifConnectScuess.value,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"请将您的手指按下".tr,
|
||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines:null,
|
||||
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
||||
),
|
||||
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(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(
|
||||
height: 100.h,
|
||||
),
|
||||
Obx(() => Image.asset(
|
||||
getIconNumber(state.regIndex.value),
|
||||
width: 185.w,
|
||||
height: 295.h,
|
||||
),),
|
||||
Obx(
|
||||
() => Image.asset(
|
||||
getIconNumber(state.regIndex.value),
|
||||
width: 185.w,
|
||||
height: 295.h,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 120.h,
|
||||
),
|
||||
@ -104,7 +109,7 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
"根据提示,抬起手指后再进行下一次指纹采集".tr,
|
||||
// TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines:null,
|
||||
maxLines: null,
|
||||
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 = "";
|
||||
switch(number){
|
||||
switch (number) {
|
||||
case 0:
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_one.png';
|
||||
break;
|
||||
@ -134,8 +139,11 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
case 4:
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_five.png';
|
||||
break;
|
||||
case 5:
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_six.png';
|
||||
break;
|
||||
default:
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_four.png';
|
||||
iconPath = 'images/main/icon_addFingerprint_fingerprint_six.png';
|
||||
break;
|
||||
}
|
||||
return iconPath;
|
||||
@ -172,7 +180,7 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
state.ifCurrentScreen.value = false;
|
||||
|
||||
if(state.ifAddState.value){
|
||||
if (state.ifAddState.value) {
|
||||
logic.senderCancelAddFingerprintCommand();
|
||||
}
|
||||
}
|
||||
@ -192,5 +200,4 @@ class _AddFingerprintPageState extends State<AddFingerprintPage> with RouteAware
|
||||
|
||||
state.ifCurrentScreen.value = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user