129 lines
4.5 KiB
Dart
129 lines
4.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/flavors.dart';
|
|
import 'package:star_lock/mine/addLock/lockResetConfirm/lockResetConfirm_logic.dart';
|
|
|
|
import '../../../app_settings/app_colors.dart';
|
|
import '../../../baseWidget.dart';
|
|
import '../../../tools/submitBtn.dart';
|
|
import '../../../tools/titleAppBar.dart';
|
|
|
|
class LockResetConfirmPage extends StatefulWidget {
|
|
const LockResetConfirmPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<LockResetConfirmPage> createState() => _LockResetConfirmPageState();
|
|
}
|
|
|
|
class _LockResetConfirmPageState extends State<LockResetConfirmPage>
|
|
with BaseWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetBuilder<LockResetConfirmLogic>(
|
|
init: LockResetConfirmLogic(),
|
|
builder: (LockResetConfirmLogic logic) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.white,
|
|
appBar: F.sw(
|
|
skyCall: () => TitleAppBar(
|
|
barTitle: '设备重置'.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor,
|
|
),
|
|
xhjCall: () => TitleAppBar(
|
|
barTitle: '设备重置'.tr,
|
|
haveBack: true,
|
|
backgroundColor: Colors.white,
|
|
iconColor: AppColors.blackColor,
|
|
titleColor: AppColors.blackColor,
|
|
),
|
|
),
|
|
body: ListView(
|
|
children: [
|
|
SizedBox(height: 100.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Flexible(
|
|
child: Text(
|
|
'请确认设备已重置'.tr,
|
|
style: TextStyle(
|
|
fontSize: 24.sp,
|
|
),
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
textAlign: TextAlign.center,
|
|
softWrap: true,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 120.h),
|
|
Image.asset(
|
|
'images/lockType/addLock_lockReset.png',
|
|
width: 278.w,
|
|
height: 278.w,
|
|
),
|
|
SizedBox(height: 120.h),
|
|
Container(
|
|
width: 1.sw,
|
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: Wrap(
|
|
alignment: WrapAlignment.center,
|
|
children: [
|
|
Text(
|
|
'添加设备前,请确保设备已重置为出厂状态。重置后的设备将清除所有用户数据,包括指纹、密码、卡片等信息。'.tr,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontSize: 20.sp, fontWeight: FontWeight.w500),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 20.h),
|
|
// 信息说明(左对齐)
|
|
Container(
|
|
width: 1.sw,
|
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Icon(
|
|
Icons.info_outline,
|
|
color: AppColors.touristColor,
|
|
size: 24.w,
|
|
),
|
|
SizedBox(width: 12.w),
|
|
Flexible(
|
|
child: Text(
|
|
'重置方法请查阅设备说明书'.tr,
|
|
style: TextStyle(
|
|
fontSize: 18.sp,
|
|
color: AppColors.touristColor,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
textAlign: TextAlign.left,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 70.h),
|
|
Container(
|
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: SubmitBtn(
|
|
btnName: '我已重置,继续添加'.tr,
|
|
borderRadius: 20.w,
|
|
onClick: () {
|
|
logic.confirmLockReset();
|
|
}),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|