104 lines
3.4 KiB
Dart
Executable File
104 lines
3.4 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/flavors.dart';
|
|
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
|
|
|
|
import '../../../app_settings/app_colors.dart';
|
|
import '../../../baseWidget.dart';
|
|
import '../../../tools/submitBtn.dart';
|
|
import '../../../tools/titleAppBar.dart';
|
|
|
|
class AddLockPage extends StatefulWidget {
|
|
const AddLockPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<AddLockPage> createState() => _AddLockPageState();
|
|
}
|
|
|
|
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetBuilder<AddLockLogic>(
|
|
init: AddLockLogic(),
|
|
builder: (AddLockLogic 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(
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(
|
|
height: 100.h,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
'摸亮触摸屏'.tr,
|
|
style: TextStyle(
|
|
fontSize: 24.sp,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: 120.h,
|
|
),
|
|
Obx(() => Image.asset(
|
|
logic.state.lockTypeImg.value,
|
|
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: 120.h,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
|
child: SubmitBtn(
|
|
btnName: '下一步'.tr,
|
|
borderRadius: 20.w,
|
|
onClick: () {
|
|
logic.getNearByLimits();
|
|
}),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
});
|
|
}
|
|
}
|