184 lines
6.8 KiB
Dart
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:
|
|
SizedBox(width: 60.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;
|
|
});
|
|
},
|
|
);
|
|
}
|
|
}
|