97 lines
3.1 KiB
Dart
Executable File
97 lines
3.1 KiB
Dart
Executable File
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/main/lockDetail/iris/addIris/addIris_logic.dart';
|
|
import 'package:star_lock/main/lockDetail/iris/addIris/addIris_state.dart';
|
|
|
|
import '../../../../../app_settings/app_colors.dart';
|
|
import '../../../../../tools/submitBtn.dart';
|
|
import '../../../../../tools/titleAppBar.dart';
|
|
|
|
class AddIrisPage extends StatefulWidget {
|
|
const AddIrisPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<AddIrisPage> createState() => _AddIrisPageState();
|
|
}
|
|
|
|
class _AddIrisPageState extends State<AddIrisPage> {
|
|
final AddIrisLogic logic = Get.put(AddIrisLogic());
|
|
final AddIrisState state = Get.find<AddIrisLogic>().state;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
appBar: TitleAppBar(
|
|
barTitle: "${'添加'.tr}${'虹膜'.tr}",
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor),
|
|
body: ListView(
|
|
children: <Widget>[
|
|
SizedBox(
|
|
height: 50.h,
|
|
),
|
|
Obx(() => Image.asset(
|
|
state.isClickAddFace.value == false
|
|
? 'images/main/icon_addIris_step1.png'
|
|
: 'images/main/icon_addIris_step1.png',
|
|
width: 100.w,
|
|
height: 457.h,
|
|
fit: BoxFit.fitHeight,
|
|
)),
|
|
SizedBox(
|
|
height: 60.h,
|
|
),
|
|
Container(
|
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Text(
|
|
// 虹膜提示需要国际化
|
|
'',
|
|
textAlign: TextAlign.left,
|
|
maxLines: null,
|
|
style:
|
|
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: 120.h,
|
|
),
|
|
Obx(
|
|
() => state.isClickAddFace.value == false
|
|
? Container(
|
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: SubmitBtn(
|
|
btnName: '准备好了,开始添加'.tr,
|
|
borderRadius: 20.w,
|
|
onClick: () {
|
|
state.isClickAddFace.value = true;
|
|
}),
|
|
)
|
|
: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
Text(
|
|
'正在录入中...'.tr,
|
|
style: TextStyle(
|
|
color: AppColors.darkGrayTextColor,
|
|
fontSize: 22.sp),
|
|
textAlign: TextAlign.center,
|
|
)
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|