224 lines
8.9 KiB
Dart
224 lines
8.9 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 '../../appRouters.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 MineSetPage extends StatefulWidget {
|
|
const MineSetPage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<MineSetPage> createState() => _MineSetPageState();
|
|
}
|
|
|
|
class _MineSetPageState extends State<MineSetPage> {
|
|
bool _isOn = false;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.mainBackgroundColor,
|
|
appBar: TitleAppBar(
|
|
barTitle: TranslationLoader.lanKeys!.moreSet!.tr,
|
|
haveBack: true,
|
|
backgroundColor: AppColors.mainColor),
|
|
body: Column(
|
|
children: [
|
|
Expanded(
|
|
child: ListView(
|
|
children: [
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.prompTone!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveRightWidget: true,
|
|
rightWidget: SizedBox(
|
|
width: 80.w, height: 50.h, child: _switch())),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveRightWidget: true,
|
|
rightWidget: SizedBox(
|
|
width: 80.w, height: 50.h, child: _switch())),
|
|
CommonItem(
|
|
leftTitel:
|
|
TranslationLoader.lanKeys!.pushNotification!.tr,
|
|
rightTitle: "",
|
|
isHaveRightWidget: true,
|
|
rightWidget: SizedBox(
|
|
width: 80.w, height: 50.h, child: _switch())),
|
|
SizedBox(
|
|
height: 10.h,
|
|
),
|
|
CommonItem(
|
|
leftTitel:
|
|
TranslationLoader.lanKeys!.lockUserManagement!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.lockUserManageLisPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.authorizedAdministratorListPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.lockGroup!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(context, Routers.lockGroupListPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel:
|
|
TranslationLoader.lanKeys!.transferSmartLock!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.transferSmartLockPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
|
rightTitle: "",
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.selectGetewayListPage);
|
|
}),
|
|
SizedBox(
|
|
height: 10.h,
|
|
),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.multiLanguage!.tr,
|
|
rightTitle: "简体中文",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.mineMultiLanguagePage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
|
rightTitle: TranslationLoader.lanKeys!.opened!.tr,
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(context, Routers.lockScreenPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader
|
|
.lanKeys!.hideInvalidUnlockPermissions!.tr,
|
|
rightTitle: TranslationLoader.lanKeys!.closed!.tr,
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(
|
|
context, Routers.hideInvalidUnlockPermissionsPage);
|
|
}),
|
|
CommonItem(
|
|
leftTitel: TranslationLoader.lanKeys!
|
|
.appUnlockRequiresMobilePhoneAccessToTheLock!.tr,
|
|
rightTitle: "",
|
|
isHaveLine: true,
|
|
isHaveDirection: true,
|
|
action: () {
|
|
Navigator.pushNamed(context,
|
|
Routers.aPPUnlockNeedMobileNetworkingLockPage);
|
|
}),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
SizedBox(
|
|
height: 10.h,
|
|
),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.about!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
// SizedBox(height: 10.h,),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.userAgreement!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.privacyPolicy!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.personalInformationCollectionList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.applicationPermissionDescription!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
// CommonItem(leftTitel:TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
|
//
|
|
// }),
|
|
],
|
|
),
|
|
),
|
|
// keyBottomWidget()
|
|
],
|
|
));
|
|
}
|
|
|
|
// Widget keyBottomWidget() {
|
|
// return Column(
|
|
// children: [
|
|
// SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr,
|
|
// borderRadius: 20.w,
|
|
// fontSize: 32.sp,
|
|
// margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
|
// padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
|
// onClick: () {
|
|
//
|
|
// }
|
|
// ),
|
|
// Container(
|
|
// padding: EdgeInsets.only(right: 30.w),
|
|
// // color: Colors.red,
|
|
// child: Row(
|
|
// mainAxisAlignment: MainAxisAlignment.end,
|
|
// children: [
|
|
// TextButton(
|
|
// child: Text( TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
|
|
// onPressed: () {
|
|
//
|
|
// },
|
|
// ),
|
|
// ],
|
|
// ),
|
|
// ),
|
|
// SizedBox(height: 30.h,)
|
|
// ],
|
|
// );
|
|
// }
|
|
|
|
CupertinoSwitch _switch() {
|
|
return CupertinoSwitch(
|
|
activeColor: CupertinoColors.activeBlue,
|
|
trackColor: CupertinoColors.systemGrey5,
|
|
thumbColor: CupertinoColors.white,
|
|
value: _isOn,
|
|
onChanged: (value) {
|
|
setState(() {
|
|
_isOn = value;
|
|
});
|
|
},
|
|
);
|
|
}
|
|
}
|