Daisy ad0d4ba38e 1,新增部分图片
2,更新考勤模块UI
3,更新电子钥匙模块UI
4,更新密码模块UI
5,更新卡、指纹、遥控模块UI
6,更新授权管理员模块UI
7,更新锁设置模块UI
9,新增拥有的锁界面布局
2023-07-28 15:37:33 +08:00

184 lines
6.8 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/commonItem.dart';
import '../../../../tools/submitBtn.dart';
import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart';
class LockSoundSetPage extends StatefulWidget {
const LockSoundSetPage({Key? key}) : super(key: key);
@override
State<LockSoundSetPage> createState() => _LockSoundSetPageState();
}
class _LockSoundSetPageState extends State<LockSoundSetPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.lockSound!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockSound!.tr,
rightTitle: "",
isHaveLine: false,
isHaveRightWidget: true,
rightWidget:
Container(width: 80.w, height: 50.h, child: _switch())),
Container(
height: 10.h,
),
Container(
padding: EdgeInsets.only(
left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
// color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Text(
TranslationLoader.lanKeys!.lockSoundTip!.tr,
style: TextStyle(fontSize: 20.sp),
)),
],
),
),
SizedBox(
height: 10.h,
),
Visibility(
visible: true,
child: Container(
color: Colors.white,
child: Column(
children: [
CommonItem(
leftTitel: TranslationLoader
.lanKeys!.pleaseSeletLockVolume!.tr,
rightTitle: "",
isHaveLine: true),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.low!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lower!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.medium!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.higher!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.high!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: GestureDetector(
onTap: () {},
child: Row(
children: [
Image.asset(
'images/icon_round_unSelet.png',
width: 30.w,
height: 30.w,
),
],
),
)),
],
),
)),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 30.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
onClick: () {
// Navigator.pushNamed(context, Routers.nearbyLockPage);
}),
),
],
));
}
CupertinoSwitch _switch() {
bool _isOn = false;
return CupertinoSwitch(
activeColor: CupertinoColors.activeBlue,
trackColor: CupertinoColors.systemGrey5,
thumbColor: CupertinoColors.white,
value: _isOn,
onChanged: (value) {
setState(() {
_isOn = value;
});
},
);
}
}