2024-01-06 11:38:15 +08:00

71 lines
2.3 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart';
import 'addICCard_logic.dart';
class AddICCardPage extends StatefulWidget {
const AddICCardPage({Key? key}) : super(key: key);
@override
State<AddICCardPage> createState() => _AddICCardPageState();
}
class _AddICCardPageState extends State<AddICCardPage> {
final logic = Get.put(AddICCardLogic());
final state = Get.find<AddICCardLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
"${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.card!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 200.h),
Image.asset(
'images/main/icon_addCard.png',
width: 234.w,
height: 211.h,
fit: BoxFit.cover,
),
SizedBox(height: 90.h),
CupertinoActivityIndicator(
radius: 25.h,
),
SizedBox(height: 120.h),
Container(
width: 1.sw,
height: 50.h,
// padding: EdgeInsets.only(left: 30.w, right: 30.w, top: 10.h, bottom: 10.h),
margin: EdgeInsets.only(
left: 15.w, right: 15.w, top: 10.h, bottom: 10.h),
// color: AppColors.blackColor,
decoration: BoxDecoration(
color: AppColors.blackColor,
borderRadius: BorderRadius.circular(10.w),
),
child: Center(
child: Obx(() => Text(
state.ifConnectScuess.value
? "已连接到锁,请将卡靠近锁的读卡区"
: "尝试连接设备...",
style: TextStyle(color: Colors.white, fontSize: 24.sp)))),
),
],
),
);
}
}