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 createState() => _MineSetPageState(); } class _MineSetPageState extends State { 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: 60.w, height: 50.h, child: _switch())), CommonItem( leftTitel: TranslationLoader.lanKeys!.touchUnlock!.tr, rightTitle: "", isHaveLine: true, isHaveRightWidget: true, rightWidget: SizedBox( width: 60.w, height: 50.h, child: _switch())), CommonItem( leftTitel: TranslationLoader.lanKeys!.pushNotification!.tr, rightTitle: "", isHaveRightWidget: true, rightWidget: SizedBox( width: 60.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); }), //by DaisyWu 新增--权限管理 CommonItem( leftTitel: TranslationLoader.lanKeys!.authorityManagement!.tr, rightTitle: "", isHaveLine: true, isHaveDirection: true, action: () { Navigator.pushNamed( context, Routers.authorityManagementPage); }), 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); }), SizedBox( height: 10.h, ), CommonItem( leftTitel: "Amazon Alexa", rightTitle: "", isHaveLine: true, isHaveDirection: true, action: () {}), CommonItem( leftTitel: "Google Home", rightTitle: "", isHaveLine: true, isHaveDirection: true, action: () {}), // CommonItem(leftTitel:TranslationLoader.lanKeys!.valueAddedServices!.tr, rightTitle:"", isHaveDirection: true, action: (){ // // }), SizedBox( height: 50.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, isDelete: true, 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.darkGrayTextColor, fontSize: 18.sp), ), 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; }); }, ); } }