92 lines
3.2 KiB
Dart
Executable File
92 lines
3.2 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/lockSet/markedHouseState/markedHouseState_state.dart';
|
|
|
|
import '../../../../app_settings/app_colors.dart';
|
|
import '../../../../tools/commonItem.dart';
|
|
import '../../../../tools/submitBtn.dart';
|
|
import '../../../../tools/titleAppBar.dart';
|
|
import 'markedHouseState_logic.dart';
|
|
|
|
class MarkedHouseStatePage extends StatefulWidget {
|
|
const MarkedHouseStatePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<MarkedHouseStatePage> createState() => _MarkedHouseStatePageState();
|
|
}
|
|
|
|
class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
|
|
final MarkedHouseStateLogic logic = Get.put(MarkedHouseStateLogic());
|
|
final MarkedHouseStateState state = Get.find<MarkedHouseStateLogic>().state;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.mainBackgroundColor,
|
|
appBar: TitleAppBar(
|
|
barTitle: '标记房态'.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor),
|
|
body: Column(
|
|
children: <Widget>[
|
|
Obx(() => CommonItem(
|
|
leftTitel: '空闲'.tr,
|
|
rightTitle: '',
|
|
isHaveLine: true,
|
|
isHaveRightWidget: true,
|
|
rightWidget: GestureDetector(
|
|
onTap: () {
|
|
setState(() {
|
|
state.roomStatus.value = 0;
|
|
});
|
|
},
|
|
child: Row(
|
|
children: <Widget>[
|
|
Image.asset(
|
|
state.roomStatus.value == 0 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png',
|
|
width: 30.w,
|
|
height: 30.w,
|
|
),
|
|
],
|
|
),
|
|
))),
|
|
Obx(() => CommonItem(
|
|
leftTitel: '已入住'.tr,
|
|
rightTitle: '',
|
|
isHaveLine: false,
|
|
isHaveRightWidget: true,
|
|
rightWidget: GestureDetector(
|
|
onTap: () {
|
|
setState(() {
|
|
state.roomStatus.value = 1;
|
|
});
|
|
},
|
|
child: Row(
|
|
children: <Widget>[
|
|
Image.asset(
|
|
state.roomStatus.value == 1 ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png',
|
|
width: 30.w,
|
|
height: 30.w,
|
|
),
|
|
],
|
|
),
|
|
))),
|
|
SizedBox(
|
|
height: 60.h,
|
|
),
|
|
SubmitBtn(
|
|
btnName: '确定'.tr,
|
|
borderRadius: 20.w,
|
|
fontSize: 32.sp,
|
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
|
onClick: () {
|
|
logic.setRoomStatusData();
|
|
}),
|
|
],
|
|
));
|
|
}
|
|
}
|