1,星锁主界面UI更新
2,锁列表UI更新 3,侧边栏 个人信息模块UI更新 4,添加锁模块UI更新 5,我的-设置模块UI更新 6,新增“添加授权管理员”页面UI布局
BIN
star_lock/images/icon_bar_more.png
Normal file
|
After Width: | Height: | Size: 624 B |
BIN
star_lock/images/icon_bar_search.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
star_lock/images/icon_right_grey.png
Normal file
|
After Width: | Height: | Size: 753 B |
@ -188,6 +188,7 @@
|
||||
"lanChinese":"Chinese",
|
||||
"multilingual":"Multilingual",
|
||||
"addLock":"Add Lock",
|
||||
"addDevice":"Add device",
|
||||
"gateway":"Gateway",
|
||||
"message":"Message",
|
||||
"supportStaff":"Support Staff",
|
||||
@ -201,6 +202,7 @@
|
||||
"lockUserManagement":"Lock User Management",
|
||||
"aboutToExpire":"About to expire",
|
||||
"authorizedAdmin":"Authorized Admin",
|
||||
"addAuthorizedAdmin":"Adding an Authorized Administrator",
|
||||
"lockGroup":"Lock Group",
|
||||
"transferSmartLock":"Transfer Smart Lock",
|
||||
"selectiveLock":"Selective lock",
|
||||
@ -230,7 +232,9 @@
|
||||
"safetyProblem":"Safety Problem",
|
||||
"modifyAccountTip":"For the security of your account, please use the account password verification before modifying the account",
|
||||
"pleaseEnterAccountNumber":"Please enter your account number",
|
||||
"pleaseEnterNewAccountNumber":"Please enter your new account number",
|
||||
"changeIphoneTip":"When you retrieve your password and log in to a new device, you can verify it with the attached phone",
|
||||
"changeEmailTip":"When you retrieve your password and log in to a new device, you can verify it with the attached Email",
|
||||
"originalPassword":"Original Password",
|
||||
"newPassword":"New Password",
|
||||
"surePassword":"Sure Password",
|
||||
@ -276,6 +280,7 @@
|
||||
"padlock":"Pad lock",
|
||||
"safeLock":"Safe Lock",
|
||||
"intelligentLockCore":"Intelligent Lock Core",
|
||||
"itelligentAccessControl":"Intelligent access control",
|
||||
"parkingLock":"Parking Lock",
|
||||
"bicycleLock":"Bicycle Lock",
|
||||
"longRangeControl":"LongRange Control",
|
||||
|
||||
@ -188,6 +188,7 @@
|
||||
"lanChinese":"lanChinese",
|
||||
"multilingual":"multilingual",
|
||||
"addLock":"addLock",
|
||||
"addDevice":"addDevice",
|
||||
"gateway":"gateway",
|
||||
"message":"message",
|
||||
"supportStaff":"supportStaff",
|
||||
@ -200,6 +201,7 @@
|
||||
"pushNotification":"pushNotification",
|
||||
"lockUserManagement":"lockUserManagement",
|
||||
"authorizedAdmin":"authorizedAdmin",
|
||||
"addAuthorizedAdmin":"addAuthorizedAdmin",
|
||||
"lockGroup":"lockGroup",
|
||||
"transferSmartLock":"transferSmartLock",
|
||||
"selectiveLock":"selectiveLock",
|
||||
@ -229,7 +231,9 @@
|
||||
"safetyProblem":"safetyProblem",
|
||||
"modifyAccountTip":"modifyAccountTip",
|
||||
"pleaseEnterAccountNumber":"pleaseEnterAccountNumber",
|
||||
"pleaseEnterNewAccountNumber":"pleaseEnterNewAccountNumber",
|
||||
"changeIphoneTip":"changeIphoneTip",
|
||||
"changeEmailTip":"changeEmailTip",
|
||||
"originalPassword":"originalPassword",
|
||||
"newPassword":"newPassword",
|
||||
"surePassword":"surePassword",
|
||||
@ -276,6 +280,7 @@
|
||||
"padlock":"padlock",
|
||||
"safeLock":"safeLock",
|
||||
"intelligentLockCore":"intelligentLockCore",
|
||||
"itelligentAccessControl":"itelligentAccessControl",
|
||||
"parkingLock":"parkingLock",
|
||||
"bicycleLock":"bicycleLock",
|
||||
"longRangeControl":"longRangeControl",
|
||||
|
||||
@ -188,6 +188,7 @@
|
||||
"lanChinese":"中文",
|
||||
"multilingual":"多语言",
|
||||
"addLock":"添加锁",
|
||||
"addDevice":"添加设备",
|
||||
"gateway":"网关",
|
||||
"message":"消息",
|
||||
"supportStaff":"客服",
|
||||
@ -200,6 +201,7 @@
|
||||
"pushNotification":"消息推送",
|
||||
"lockUserManagement":"锁用户管理",
|
||||
"authorizedAdmin":"授权管理员",
|
||||
"addAuthorizedAdmin":"添加授权管理员",
|
||||
"lockGroup":"锁分组",
|
||||
"transferSmartLock":"转移智能锁",
|
||||
"selectiveLock":"选择锁",
|
||||
@ -229,7 +231,9 @@
|
||||
"safetyProblem":"安全问题",
|
||||
"modifyAccountTip":"为了你的账号安全,修改账号前请先使用账号密码验证",
|
||||
"pleaseEnterAccountNumber":"请输入账号",
|
||||
"changeIphoneTip":"找回密码和登陆新设备时,可通过绑定的手机验证",
|
||||
"pleaseEnterNewAccountNumber":"请输入新账号",
|
||||
"changeIphoneTip":"找回密码和登录新设备时,可通过绑定的手机验证",
|
||||
"changeEmailTip":"找回密码和登录新设备时,可通过绑定的邮箱验证",
|
||||
"originalPassword":"原密码",
|
||||
"newPassword":"新密码",
|
||||
"surePassword":"确认密码",
|
||||
@ -276,11 +280,12 @@
|
||||
"padlock":"挂锁",
|
||||
"safeLock":"保险箱锁",
|
||||
"intelligentLockCore":"智能锁芯",
|
||||
"itelligentAccessControl":"智能门禁",
|
||||
"parkingLock":"车位锁",
|
||||
"bicycleLock":"自行车锁",
|
||||
"longRangeControl":"远程控制",
|
||||
"lightTouchScreen":"摸亮触摸屏",
|
||||
"lightTouchScreenTip":"摸亮触摸屏,锁进入可添加状态,点击下一步",
|
||||
"lightTouchScreenTip":"摸亮触摸屏,锁进入可添加状态,点击下一步",
|
||||
"next":"下一步",
|
||||
"nearbyLock":"附近的锁",
|
||||
"addSuccessfullyPleaseRename":"添加成功,请重命名",
|
||||
|
||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
star_lock/images/mine/icon_mine_editPersonInfo.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 15 KiB |
BIN
star_lock/images/mine/icon_mine_topBg.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/minePersonInfoEmail_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList_page.dart';
|
||||
import 'package:star_lock/mine/mineSet/mineSet_page.dart';
|
||||
@ -202,6 +204,8 @@ abstract class Routers {
|
||||
'/MinePersonInfoResetPasswordPage'; // 我的信息重置密码
|
||||
static const minePersonInfoSetSafetyProblemPage =
|
||||
'/MinePersonInfoSetSafetyProblemPage'; // 我的信息设置安全问题
|
||||
static const minePersonInfoEditEmailPage =
|
||||
'/MinePersonInfoEditEmailPage'; //我的信息-邮箱
|
||||
|
||||
static const gatewayListPage = '/GatewayListPage'; // 我的-网关
|
||||
static const gatewayDetailPage = '/GatewayDetailPage'; // 我的-网关详情
|
||||
@ -253,6 +257,8 @@ abstract class Routers {
|
||||
static const recipientInformationPage = '/recipientInformationPage'; //接受人信息
|
||||
static const selectBranchPage = '/SelectBranchPage'; //选择分店
|
||||
static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关
|
||||
static const addAuthorizedAdministratorPage =
|
||||
'/addAuthorizedAdministratorPage'; //添加授权管理员
|
||||
|
||||
static const starLockLoginPage = '/StarLockLoginPage'; // 登录
|
||||
static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册
|
||||
@ -675,6 +681,12 @@ abstract class AppRouters {
|
||||
name: Routers.selectBranchPage, page: () => const SelectBranchPage()),
|
||||
GetPage(
|
||||
name: Routers.selectGetewayListPage,
|
||||
page: () => const SelectGetewayListPage())
|
||||
page: () => const SelectGetewayListPage()),
|
||||
GetPage(
|
||||
name: Routers.minePersonInfoEditEmailPage,
|
||||
page: () => const MinePersonInfoEditEmailPage()),
|
||||
GetPage(
|
||||
name: Routers.addAuthorizedAdministratorPage,
|
||||
page: () => const AddAuthorizedAdministratorPage())
|
||||
];
|
||||
}
|
||||
|
||||
@ -115,7 +115,9 @@ class AppColors {
|
||||
static Color progressBgColor = const Color(0xFF022345);
|
||||
static Color progressValueColor = const Color(0xFF0093E5);
|
||||
|
||||
static const greyLineColor = Color.fromRGBO(240, 240, 240, 1); //灰色分割线
|
||||
static const greyLineColor = Color.fromRGBO(220, 220, 220, 1); //灰色分割线
|
||||
static const darkGrayTextColor = Color.fromRGBO(65, 65, 65, 1); //深灰色字体
|
||||
static const placeholderTextColor = Color.fromRGBO(128, 128, 128, 1); //占位字体颜色
|
||||
static const greyBackgroundColor = Color.fromRGBO(240, 240, 240, 1); //灰色背景色
|
||||
static const btnDisableColor = Color.fromRGBO(178, 178, 178, 1); //按钮不可用灰色
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenUtilInit(
|
||||
designSize: const Size(750, 1334),
|
||||
designSize: const Size(585, 1265),
|
||||
builder: (w, a) => _initMaterialApp());
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -11,20 +10,26 @@ class AuthorizedAdminManagePage extends StatefulWidget {
|
||||
const AuthorizedAdminManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminManagePage> createState() => _AuthorizedAdminManagePageState();
|
||||
State<AuthorizedAdminManagePage> createState() =>
|
||||
_AuthorizedAdminManagePageState();
|
||||
}
|
||||
|
||||
class _AuthorizedAdminManagePageState extends State<AuthorizedAdminManagePage> {
|
||||
var index=0;
|
||||
var index = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
AuthorizedAdminManageTabbar(initialIndex: index,),
|
||||
AuthorizedAdminManageTabbar(
|
||||
initialIndex: index,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -15,7 +14,8 @@ class AuthorizedAdminDetailPage extends StatefulWidget {
|
||||
const AuthorizedAdminDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminDetailPage> createState() => _AuthorizedAdminDetailPageState();
|
||||
State<AuthorizedAdminDetailPage> createState() =>
|
||||
_AuthorizedAdminDetailPageState();
|
||||
}
|
||||
|
||||
class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
@ -23,51 +23,82 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.authorizedAdmin!.tr}${TranslationLoader.lanKeys!.detail!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.share!.tr, style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.authorizedAdmin!.tr}${TranslationLoader.lanKeys!.detail!.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.share!.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.password!.tr,
|
||||
rightTitle: "98765432",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "你好",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "永久",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||
rightTitle: "15080825640",
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||
rightTitle: "2020.06.21 11:49",
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){
|
||||
Widget commonItem(String leftTitle, String rightTitle,
|
||||
{bool isHaveDirection = false,
|
||||
bool isHaveLine = false,
|
||||
bool isHaveRightWidget = false,
|
||||
Widget? rightWidget,
|
||||
Function()? action}) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -76,27 +107,50 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
Container(
|
||||
// height: 80.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Text(
|
||||
leftTitle,
|
||||
style:
|
||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget
|
||||
? rightWidget!
|
||||
: Text(
|
||||
rightTitle,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
SizedBox(width: 5.w),
|
||||
isHaveDirection
|
||||
? Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
)
|
||||
: SizedBox(width: 10.w),
|
||||
// SizedBox(width:10.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
isHaveLine
|
||||
? Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -112,7 +166,9 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
title: const Text("修改密码"),
|
||||
content: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
height: 80.h,
|
||||
// color: Colors.white,
|
||||
@ -172,5 +228,4 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -64,17 +64,19 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -12,13 +12,16 @@ import '../../../../translations/trans_lib.dart';
|
||||
class VolumeAuthorizationLockPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const VolumeAuthorizationLockPage({Key? key, required this.type}):super(key:key);
|
||||
const VolumeAuthorizationLockPage({Key? key, required this.type})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<VolumeAuthorizationLockPage> createState() => _VolumeAuthorizationLockPageState();
|
||||
State<VolumeAuthorizationLockPage> createState() =>
|
||||
_VolumeAuthorizationLockPageState();
|
||||
}
|
||||
|
||||
class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPage> {
|
||||
class _VolumeAuthorizationLockPageState
|
||||
extends State<VolumeAuthorizationLockPage> {
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
late Contact _contact;
|
||||
|
||||
@ -31,10 +34,9 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
Widget indexChangeWidget(){
|
||||
Widget indexChangeWidget() {
|
||||
switch (int.parse(widget.type)) {
|
||||
case 0:
|
||||
{
|
||||
@ -48,7 +50,7 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
);
|
||||
}
|
||||
default:
|
||||
// 限时
|
||||
// 限时
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
@ -62,45 +64,67 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
}
|
||||
|
||||
// 顶部钥匙信息widget
|
||||
Widget keyInfoWidget(){
|
||||
Widget keyInfoWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.number!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.number!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget:
|
||||
getTFWidget(false, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget(){
|
||||
Widget keyTimeWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveLine: true),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 远程开锁
|
||||
Widget remoteUnlockingWidget(){
|
||||
Widget remoteUnlockingWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lock!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseSelet!.tr, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.pleaseSelet!.tr,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: SizedBox(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(width: 80.w, height: 50.h, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget(){
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(
|
||||
@ -108,16 +132,15 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(bool isHaveBtn, String tfStr){
|
||||
Widget getTFWidget(bool isHaveBtn, String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
@ -129,7 +152,7 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
textAlign:TextAlign.end,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
@ -139,43 +162,48 @@ class _VolumeAuthorizationLockPageState extends State<VolumeAuthorizationLockPag
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w,),
|
||||
isHaveBtn?Container(
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_lock.png'),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
),
|
||||
):Container()
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
isHaveBtn
|
||||
? Container(
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_lock.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -25,34 +24,68 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.checkingIn!.tr} ${TranslationLoader.lanKeys!.set!.tr}", haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.checkingIn!.tr} ${TranslationLoader.lanKeys!.set!.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}", rightTitle:"深圳市志超科技", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.staff!.tr, rightTitle:"0", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInStaffManagePage);
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"9:00 - 18:00", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkTimePage);
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}", rightTitle:"1,2,3,4,5", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.holidays!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage);
|
||||
}),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: "${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}",
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.company!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
|
||||
rightTitle: "深圳市志超科技",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.staff!.tr,
|
||||
rightTitle: "0",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.checkingInStaffManagePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: "9:00 - 18:00",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkTimePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.workday!.tr} ${TranslationLoader.lanKeys!.set!.tr}",
|
||||
rightTitle: "1,2,3,4,5",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.checkingInSetWorkdaySet);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.holidays!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.checkingInSetHolidaysPage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName:
|
||||
"${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}",
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
isDelete: true,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -62,7 +95,11 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"", controller: _changeNameController);
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
|
||||
tipTitle: "",
|
||||
controller: _changeNameController);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,8 @@ class ElectronicKeyDetailPage extends StatefulWidget {
|
||||
const ElectronicKeyDetailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyDetailPage> createState() => _ElectronicKeyDetailPageState();
|
||||
State<ElectronicKeyDetailPage> createState() =>
|
||||
_ElectronicKeyDetailPageState();
|
||||
}
|
||||
|
||||
class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
@ -26,49 +27,75 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.keyDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.keyDetail!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"魏", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, allHeight: 90.h,rightTitle:"2020.06.20 11:49\n2020.06.21 11:49", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "魏",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
allHeight: 90.h,
|
||||
rightTitle: "2020.06.20 11:49\n2020.06.21 11:49",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"786612630@qq.com",action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: "786612630@qq.com",
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||
rightTitle: "15080825640",
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||
rightTitle: "2020.06.21 11:49",
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(width: 80.w, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
isDelete: true,
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){
|
||||
Widget commonItem(String leftTitle, String rightTitle,
|
||||
{bool isHaveDirection = false,
|
||||
bool isHaveLine = false,
|
||||
bool isHaveRightWidget = false,
|
||||
Widget? rightWidget,
|
||||
Function()? action}) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -77,41 +104,67 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
Container(
|
||||
// height: 80.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Text(
|
||||
leftTitle,
|
||||
style:
|
||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget
|
||||
? rightWidget!
|
||||
: Text(
|
||||
rightTitle,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
SizedBox(width: 5.w),
|
||||
isHaveDirection
|
||||
? Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
)
|
||||
: SizedBox(width: 10.w),
|
||||
// SizedBox(width:10.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
isHaveLine
|
||||
? Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -119,8 +172,11 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"请输入", controller: _changeNameController);
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
|
||||
tipTitle: "请输入",
|
||||
controller: _changeNameController);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_cupertino_datetime_picker/flutter_cupertino_datetime_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
@ -13,45 +13,69 @@ class ElectronicKeyDetailChangeDate extends StatefulWidget {
|
||||
const ElectronicKeyDetailChangeDate({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyDetailChangeDate> createState() => _ElectronicKeyDetailChangeDateState();
|
||||
State<ElectronicKeyDetailChangeDate> createState() =>
|
||||
_ElectronicKeyDetailChangeDateState();
|
||||
}
|
||||
|
||||
class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChangeDate> {
|
||||
|
||||
class _ElectronicKeyDetailChangeDateState
|
||||
extends State<ElectronicKeyDetailChangeDate> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.periodValidity!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(child: Text(TranslationLoader.lanKeys!.sure!.tr, style: const TextStyle(color: Colors.white),), onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
body: buildMainUI(),
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: buildMainUI(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildMainUI(){
|
||||
Widget buildMainUI() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
ShowSeletDateTime().showDatePicker(context, '2100-01-01 00:00', '1900-01-01 00:00', getNowDate(),'yyyy-MMMM-dd HH:mm', (dateTime, List<int> index) {
|
||||
|
||||
});
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
ShowSeletDateTime().showDatePicker(context, '00:00', '00:00', getNowDate(),'HH:mm', (dateTime, List<int> index) {
|
||||
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
ShowSeletDateTime().showDatePicker(
|
||||
context,
|
||||
'2100-01-01 00:00',
|
||||
'1900-01-01 00:00',
|
||||
getNowDate(),
|
||||
'yyyy-MMMM-dd HH:mm',
|
||||
(dateTime, List<int> index) {});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
ShowSeletDateTime().showDatePicker(context, '00:00', '00:00',
|
||||
getNowDate(), 'HH:mm', (dateTime, List<int> index) {});
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String getNowDate(){
|
||||
String getNowDate() {
|
||||
// 获取当前时间对象
|
||||
DateTime today = DateTime.now();
|
||||
String dateSlug ="${today.hour.toString().padLeft(2,'0')}:${today.minute.toString().padLeft(2,'0')}";
|
||||
String dateSlug =
|
||||
"${today.hour.toString().padLeft(2, '0')}:${today.minute.toString().padLeft(2, '0')}";
|
||||
|
||||
// //获取当前时间的年
|
||||
// int year = now.year;
|
||||
|
||||
@ -56,7 +56,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -64,17 +64,19 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -12,26 +12,32 @@ class ElectronicKeyPeriodValidityPage extends StatefulWidget {
|
||||
const ElectronicKeyPeriodValidityPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ElectronicKeyPeriodValidityPage> createState() => _ElectronicKeyPeriodValidityPageState();
|
||||
State<ElectronicKeyPeriodValidityPage> createState() =>
|
||||
_ElectronicKeyPeriodValidityPageState();
|
||||
}
|
||||
|
||||
class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodValidityPage> {
|
||||
class _ElectronicKeyPeriodValidityPageState
|
||||
extends State<ElectronicKeyPeriodValidityPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.periodValidity!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 1.h,
|
||||
),
|
||||
bottomWidget()
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget topWidget(){
|
||||
Widget topWidget() {
|
||||
return Container(
|
||||
height: 150.h,
|
||||
width: 1.sw,
|
||||
@ -42,28 +48,26 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
Container(
|
||||
height: 60.h,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(left:15.h, top: 15.h),
|
||||
child: Text(TranslationLoader.lanKeys!.periodValidity!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
|
||||
),
|
||||
Container(
|
||||
height: 90.h,
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 7,
|
||||
childAspectRatio: 1.0
|
||||
),
|
||||
itemCount: 7,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context,index){
|
||||
return btnItem(index);
|
||||
})
|
||||
)
|
||||
padding: EdgeInsets.only(left: 15.h, top: 15.h),
|
||||
child: Text(TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))),
|
||||
SizedBox(
|
||||
height: 80.h,
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 7, childAspectRatio: 1.0),
|
||||
itemCount: 7,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
return btnItem(index);
|
||||
}))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget btnItem(int index){
|
||||
Widget btnItem(int index) {
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -92,49 +96,60 @@ class _ElectronicKeyPeriodValidityPageState extends State<ElectronicKeyPeriodVal
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
width: 70.h,
|
||||
height: 70.h,
|
||||
margin: EdgeInsets.all(10.h),
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
margin: EdgeInsets.all(10.w),
|
||||
decoration: BoxDecoration(
|
||||
// color: Colors.blue,
|
||||
border: Border.all(width: 1, color: Colors.grey),
|
||||
borderRadius: BorderRadius.circular(60.w),
|
||||
border: Border.all(width: 1, color: AppColors.greyBackgroundColor),
|
||||
borderRadius: BorderRadius.circular(30.w),
|
||||
),
|
||||
child: Center(child: Text(dateStr)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
dateStr,
|
||||
style: TextStyle(fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottomWidget(){
|
||||
Widget bottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveDate!.tr, rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureDate!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveDate!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureDate!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -13,10 +13,12 @@ import '../../../../translations/trans_lib.dart';
|
||||
class MassSendElectronicKeyPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const MassSendElectronicKeyPage({Key? key, required this.type}) : super(key: key);
|
||||
const MassSendElectronicKeyPage({Key? key, required this.type})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyPage> createState() => _MassSendElectronicKeyPageState();
|
||||
State<MassSendElectronicKeyPage> createState() =>
|
||||
_MassSendElectronicKeyPageState();
|
||||
}
|
||||
|
||||
class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
@ -32,10 +34,9 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
Widget indexChangeWidget(){
|
||||
Widget indexChangeWidget() {
|
||||
switch (int.parse(widget.type)) {
|
||||
case 0:
|
||||
{
|
||||
@ -82,82 +83,99 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
}
|
||||
|
||||
// 顶部钥匙信息widget
|
||||
Widget keyInfoWidget(){
|
||||
Widget keyInfoWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseAdd!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lock!.tr, rightTitle:TranslationLoader.lanKeys!.pleaseSelet!.tr, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.pleaseAdd!.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.pleaseSelet!.tr,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget(){
|
||||
Widget keyTimeWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", ),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveLine: true),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 远程开锁
|
||||
Widget remoteUnlockingWidget(){
|
||||
Widget remoteUnlockingWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 有效期
|
||||
Widget periodValidityWidget(){
|
||||
Widget periodValidityWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget(){
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.send!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,15 +8,19 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import '../massSendElectronicKey_page.dart';
|
||||
|
||||
class MassSendElectronicKeyManageTabbar extends StatefulWidget {
|
||||
var initialIndex=1;
|
||||
var initialIndex = 1;
|
||||
|
||||
MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyManageTabbar> createState() => _MassSendElectronicKeyManageTabbarState();
|
||||
State<MassSendElectronicKeyManageTabbar> createState() =>
|
||||
_MassSendElectronicKeyManageTabbarState();
|
||||
}
|
||||
|
||||
class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKeyManageTabbar> with SingleTickerProviderStateMixin {
|
||||
class _MassSendElectronicKeyManageTabbarState
|
||||
extends State<MassSendElectronicKeyManageTabbar>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
@ -29,33 +33,44 @@ class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKe
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(vsync: this, length: _itemTabs.length,initialIndex: widget.initialIndex);
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
length: _itemTabs.length,
|
||||
initialIndex: widget.initialIndex);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
)
|
||||
);
|
||||
children: [
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
TabBar _tabBar(){
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
unselectedLabelColor: Colors.black,
|
||||
unselectedLabelStyle: TextStyle(color:AppColors.mainColor,fontSize: 28.sp,),
|
||||
automaticIndicatorColorAdjustment:true,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 28.sp,
|
||||
),
|
||||
automaticIndicatorColorAdjustment: true,
|
||||
labelColor: AppColors.mainColor,
|
||||
labelStyle: TextStyle(color: AppColors.mainColor,fontSize: 32.sp,fontWeight: FontWeight.w600),
|
||||
indicator: CustomUnderlineTabIndicator(borderSide: BorderSide(color: AppColors.mainColor,width: 10.w),strokeCap: StrokeCap.round,width: 0.w),
|
||||
labelStyle: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 32.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
indicator: CustomUnderlineTabIndicator(
|
||||
borderSide: BorderSide(color: AppColors.mainColor, width: 4.w),
|
||||
strokeCap: StrokeCap.round,
|
||||
width: 30.w),
|
||||
);
|
||||
}
|
||||
|
||||
@ -63,19 +78,27 @@ class _MassSendElectronicKeyManageTabbarState extends State<MassSendElectronicKe
|
||||
return Tab(
|
||||
// text: item.title,
|
||||
child: Container(
|
||||
width: 1.sw/8,
|
||||
width: 1.sw / 8,
|
||||
margin: EdgeInsets.all(10.w),
|
||||
// color: Colors.red,
|
||||
child: Text(item.title, textAlign: TextAlign.center,),
|
||||
child: Text(
|
||||
item.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _pageWidget(){
|
||||
Widget _pageWidget() {
|
||||
return Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: _itemTabs.map((ItemView item) => MassSendElectronicKeyPage(type: item.type,)).toList(),
|
||||
children: _itemTabs
|
||||
.map((ItemView item) => MassSendElectronicKeyPage(
|
||||
type: item.type,
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -32,10 +32,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
Widget indexChangeWidget(){
|
||||
Widget indexChangeWidget() {
|
||||
switch (int.parse(widget.type)) {
|
||||
case 0:
|
||||
{
|
||||
@ -55,22 +54,14 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
{
|
||||
// 永久
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
keyRealNameWidget(),
|
||||
keyBottomWidget()
|
||||
],
|
||||
children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()],
|
||||
);
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
// 单次
|
||||
return Column(
|
||||
children: [
|
||||
keyInfoWidget(),
|
||||
keyRealNameWidget(),
|
||||
keyBottomWidget()
|
||||
],
|
||||
children: [keyInfoWidget(), keyRealNameWidget(), keyBottomWidget()],
|
||||
);
|
||||
}
|
||||
case 3:
|
||||
@ -91,56 +82,84 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
}
|
||||
|
||||
// 顶部钥匙信息widget
|
||||
Widget keyInfoWidget(){
|
||||
Widget keyInfoWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.receiver!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true, TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget(){
|
||||
Widget keyTimeWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 实名认证
|
||||
Widget keyRealNameWidget(){
|
||||
Widget keyRealNameWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.realNameAuthentication!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 有效期
|
||||
Widget keyPeriodValidityWidget(){
|
||||
Widget keyPeriodValidityWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyPeriodValidityPage);
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget(){
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -148,24 +167,32 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.sendKeyBottomTip!.tr, textAlign: TextAlign.start,)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sendKeyBottomTip!.tr,
|
||||
textAlign: TextAlign.start,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.send!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.send!.tr, onClick: () {}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right:30.w),
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(onPressed: (){
|
||||
Navigator.pushNamed(context, Routers.massSendElectronicKeyManagePage);
|
||||
}, child: Text(TranslationLoader.lanKeys!.sendGroupKey!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),)),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.massSendElectronicKeyManagePage);
|
||||
},
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontWeight: FontWeight.w500),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -174,7 +201,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
}
|
||||
|
||||
// 发送电子钥匙成功
|
||||
Widget sendElectronicKeySucceed(){
|
||||
Widget sendElectronicKeySucceed() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -183,49 +210,84 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.h,),
|
||||
Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
|
||||
SizedBox(height: 20.h,),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Image.asset(
|
||||
'images/main/icon_main_addLock.png',
|
||||
width: 150.w,
|
||||
height: 150.w,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("发送成功",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
|
||||
Text(
|
||||
"发送成功",
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SubmitBtn(btnName: '邮件通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||
}),
|
||||
SubmitBtn(btnName: '微信通知', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SubmitBtn(btnName: '标记为已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: '完成',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
SubmitBtn(
|
||||
btnName: '邮件通知',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||
}),
|
||||
SubmitBtn(
|
||||
btnName: '微信通知',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
SubmitBtn(
|
||||
btnName: '标记为已入住',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(bool isHaveBtn, String tfStr){
|
||||
Widget getTFWidget(bool isHaveBtn, String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
textAlign:TextAlign.end,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
@ -233,45 +295,50 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w,),
|
||||
isHaveBtn?Container(
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_lock.png'),
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
),
|
||||
):Container()
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
isHaveBtn
|
||||
? Container(
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
image: DecorationImage(
|
||||
image: AssetImage('images/icon_lock.png'),
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
Contact? contact = await _contactPicker.selectContact();
|
||||
setState(() {
|
||||
_contact = contact!;
|
||||
// print("object111111111111 ${_contact.fullName} ${_contact.phoneNumbers}");
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -25,35 +25,56 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.automaticBlocking!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Container(height: 10.h,),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
return CommonItem(leftTitel:TranslationLoader.lanKeys!.delayTime!.tr, rightTitle:"5s", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
var list = ["5S", "10S", "15S", "30S", "60S", TranslationLoader.lanKeys!.custom!.tr];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 2,
|
||||
title: TranslationLoader.lanKeys!.time!.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
data: list,
|
||||
//选择事件的回调
|
||||
clickCallBack: (int index, var str) {
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget:
|
||||
Container(width: 80.w, height: 50.h, child: _switch())),
|
||||
Container(
|
||||
height: 10.h,
|
||||
),
|
||||
Builder(builder: (context) {
|
||||
return CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.delayTime!.tr,
|
||||
rightTitle: "5s",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
var list = [
|
||||
"5S",
|
||||
"10S",
|
||||
"15S",
|
||||
"30S",
|
||||
"60S",
|
||||
TranslationLoader.lanKeys!.custom!.tr
|
||||
];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
context,
|
||||
//默认的索引
|
||||
normalIndex: 2,
|
||||
title: TranslationLoader.lanKeys!.time!.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
data: list,
|
||||
//选择事件的回调
|
||||
clickCallBack: (int index, var str) {});
|
||||
});
|
||||
}),
|
||||
Container(
|
||||
height: 10.h,
|
||||
),
|
||||
Container(height: 10.h,),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Container(
|
||||
@ -62,7 +83,10 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [Text("${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),],
|
||||
children: [
|
||||
Text(
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)"),
|
||||
],
|
||||
),
|
||||
TextField(
|
||||
//输入框一行
|
||||
@ -71,43 +95,49 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage> {
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, bottom: 8.0),
|
||||
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)",
|
||||
contentPadding:
|
||||
const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.time!.tr}(S)",
|
||||
hintStyle: TextStyle(fontSize: 30.sp),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
Container(height: 0.5.h, color: Colors.grey,),
|
||||
Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.automaticBlockingTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.automaticBlockingTip!.tr)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
// margin: EdgeInsets.only(top:20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -67,17 +67,19 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: EdgeInsets.only(
|
||||
top: 8.h, left: -25.0.h, right: -15.0.h, bottom: 8.0.h),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -22,100 +22,227 @@ class _LockSetPageState extends State<LockSetPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.set!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.set!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.basicInformation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.basicInformationPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wirelessKeyboard!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.wirelessKeyboardPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.doorMagnetic!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.doorMagneticPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.remoteUnlocking!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.remoteUnlockingPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticBlocking!.tr, rightTitle:"5s", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.automaticBlockingPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:TranslationLoader.lanKeys!.closed!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.normallyOpenModePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockSound!.tr, rightTitle:"高", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockSoundSetPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.burglarAlarm!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.burglarAlarmPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.resetButton!.tr, rightTitle:TranslationLoader.lanKeys!.opened!.tr, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.resetButtonPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockQRCode!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.unlockQRCodePage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockTime!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockTimePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.diagnose!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.diagnosePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.uploadData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.uploadDataPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.importOtherLockData!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.importOtherLockDataPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lockEscalation!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.lockEscalationPage);
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:"Amazon Alexa", rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:"Google Home", rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.markedHouseState!.tr, rightTitle:"空闲", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.markedHouseStatePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.checkingIn!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.unlockReminder!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.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: () {
|
||||
|
||||
}
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.basicInformation!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.basicInformationPage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.wirelessKeyboardPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.doorMagneticPage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.closed!.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.remoteUnlockingPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||
rightTitle: "5s",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.automaticBlockingPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.closed!.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.normallyOpenModePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lockSound!.tr,
|
||||
rightTitle: "高",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.lockSoundSetPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.opened!.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.burglarAlarmPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.opened!.tr,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.resetButtonPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.unlockQRCode!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.unlockQRCodePage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.lockTimePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.diagnosePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.uploadDataPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.importOtherLockData!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.importOtherLockDataPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lockEscalation!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.lockEscalationPage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: "Amazon Alexa",
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: "Google Home",
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.markedHouseState!.tr,
|
||||
rightTitle: "空闲",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.markedHouseStatePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(
|
||||
width: 80.w, height: 50.h, child: _switch())),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(
|
||||
width: 80.w, height: 50.h, child: _switch())),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
isDelete: true,
|
||||
onClick: () {}),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -17,97 +17,163 @@ class LockSoundSetPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
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(
|
||||
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,),
|
||||
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.all(30.w),
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.h,),
|
||||
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,
|
||||
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: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.lower!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.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: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.medium!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.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: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.higher!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.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: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.high!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.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: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
)),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -17,27 +17,41 @@ class NormallyOpenModePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.normallyOpenMode!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.normallyOpenMode!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget:true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Container(height: 10.h,),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget:
|
||||
Container(width: 80.w, height: 50.h, child: _switch())),
|
||||
Container(
|
||||
height: 10.h,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.normallyOpenModeTip!.tr)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Container(
|
||||
@ -45,27 +59,26 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
child: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
bottomWidget()
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
)),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget topWidget(){
|
||||
Widget topWidget() {
|
||||
return Container(
|
||||
height: 150.h,
|
||||
width: 1.sw,
|
||||
@ -76,29 +89,28 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
Container(
|
||||
height: 60.h,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(left:20.h, top: 15.h),
|
||||
child: Text("${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))
|
||||
),
|
||||
padding: EdgeInsets.only(left: 20.h, top: 15.h),
|
||||
child: Text(
|
||||
"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.date!.tr}",
|
||||
style:
|
||||
TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600))),
|
||||
Container(
|
||||
height: 90.h,
|
||||
padding: EdgeInsets.only(left:10.w, right: 10.w),
|
||||
padding: EdgeInsets.only(left: 10.w, right: 10.w),
|
||||
child: GridView.builder(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 7,
|
||||
childAspectRatio: 1.0
|
||||
),
|
||||
crossAxisCount: 7, childAspectRatio: 1.0),
|
||||
itemCount: 7,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context,index){
|
||||
itemBuilder: (context, index) {
|
||||
return btnItem(index);
|
||||
})
|
||||
),
|
||||
})),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget btnItem(int index){
|
||||
Widget btnItem(int index) {
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 0:
|
||||
@ -127,9 +139,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
width: 70.h,
|
||||
height: 70.h,
|
||||
@ -144,55 +154,74 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottomWidget(){
|
||||
Widget bottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(color: AppColors.mainBackgroundColor, height: 10.h,),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveLine: true, isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.allDay!.tr),
|
||||
SizedBox(width: 5.w,),
|
||||
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
color: AppColors.mainBackgroundColor,
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.normallyOpen!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.allDay!.tr),
|
||||
SizedBox(
|
||||
width: 5.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:"${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}", rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.begin!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.end!.tr} ${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
Widget topWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(height: 40.h),
|
||||
SizedBox(height: 30.h),
|
||||
Stack(
|
||||
alignment: Alignment.centerRight,
|
||||
children: [
|
||||
@ -41,48 +41,49 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
child: Text(
|
||||
"MCBN01-ea9240",
|
||||
style:
|
||||
TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
|
||||
)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
"100%",
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
SizedBox(width: 5.w),
|
||||
SizedBox(width: 2.w),
|
||||
Image.asset(
|
||||
'images/main/icon_main_cell.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
width: 30.w,
|
||||
height: 24.w,
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 40.h),
|
||||
SizedBox(height: 30.h),
|
||||
Container(
|
||||
width: 1.sw,
|
||||
// width: 1.sw,
|
||||
color: Colors.white,
|
||||
height: 280.w,
|
||||
child: Stack(
|
||||
children: [
|
||||
Center(
|
||||
child: Image.asset('images/main/icon_main_openLockBtn.png',
|
||||
width: 280.w, height: 280.w)),
|
||||
width: 268.w, height: 268.w)),
|
||||
Align(
|
||||
alignment: const Alignment(0.5, 1),
|
||||
alignment: const Alignment(0.6, 1),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_remoteUnlocking.png',
|
||||
width: 90.w,
|
||||
height: 90.w,
|
||||
width: 50.w,
|
||||
height: 52.w,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -90,18 +91,18 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
fontSize: 20.sp,
|
||||
color: const Color(0xFFB3B3B3),
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
height: 30.h,
|
||||
),
|
||||
Divider(
|
||||
height: 1,
|
||||
color: const Color(0xFFB3B3B3),
|
||||
color: AppColors.greyLineColor,
|
||||
indent: 20.w,
|
||||
endIndent: 20.w,
|
||||
)
|
||||
@ -111,14 +112,14 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
|
||||
Widget bottomWidget() {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 25.h),
|
||||
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 40.h),
|
||||
// color: Colors.blue,
|
||||
child: SizedBox(
|
||||
child: GridView.count(
|
||||
crossAxisCount: 4,
|
||||
// childAspectRatio: 3,
|
||||
crossAxisSpacing: 20.w,
|
||||
mainAxisSpacing: 10.h,
|
||||
mainAxisSpacing: 0.h,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
bottomItem('images/main/icon_main_clockingIn.png',
|
||||
@ -167,8 +168,8 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
}
|
||||
|
||||
Widget bottomItem(String iconUrl, String name, Function() onClick) {
|
||||
var width = 65.w;
|
||||
var height = 70.h;
|
||||
var width = 40.w;
|
||||
var height = 36.h;
|
||||
return GestureDetector(
|
||||
onTap: onClick,
|
||||
child: Container(
|
||||
@ -183,11 +184,11 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
child: Image.asset(iconUrl,
|
||||
width: width, height: height, fit: BoxFit.fitWidth),
|
||||
),
|
||||
SizedBox(height: 15.w),
|
||||
SizedBox(height: 10.w),
|
||||
Expanded(
|
||||
child: Text(name,
|
||||
style: TextStyle(
|
||||
fontSize: 25.sp, color: const Color(0xff333333)),
|
||||
fontSize: 20.sp, color: AppColors.blackColor),
|
||||
textAlign: TextAlign.center))
|
||||
],
|
||||
)),
|
||||
|
||||
@ -67,7 +67,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -75,18 +75,19 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -22.0, right: -15.0, bottom: 10.0),
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 28.sp),
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -24,51 +24,78 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: "${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.share!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.share!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:"${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}", rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.periodValidity!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
"${getAppBarTitle(type)}${TranslationLoader.lanKeys!.number!.tr}",
|
||||
rightTitle: "98765432",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "你好",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
rightTitle: "永久",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.additive!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.addTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
rightTitle: "15080825640",
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
rightTitle: "2020.06.21 11:49",
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String getAppBarTitle(int type){
|
||||
String getAppBarTitle(int type) {
|
||||
String title = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
@ -86,7 +113,12 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
return title;
|
||||
}
|
||||
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){
|
||||
Widget commonItem(String leftTitle, String rightTitle,
|
||||
{bool isHaveDirection = false,
|
||||
bool isHaveLine = false,
|
||||
bool isHaveRightWidget = false,
|
||||
Widget? rightWidget,
|
||||
Function()? action}) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -95,27 +127,50 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
Container(
|
||||
// height: 80.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Text(
|
||||
leftTitle,
|
||||
style:
|
||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget
|
||||
? rightWidget!
|
||||
: Text(
|
||||
rightTitle,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
SizedBox(width: 5.w),
|
||||
isHaveDirection
|
||||
? Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
)
|
||||
: SizedBox(width: 10.w),
|
||||
// SizedBox(width:10.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
isHaveLine
|
||||
? Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -131,7 +186,9 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
title: const Text("修改密码"),
|
||||
content: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
height: 80.h,
|
||||
// color: Colors.white,
|
||||
@ -191,5 +248,4 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -84,17 +84,19 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -22,51 +22,81 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: const Text("分享", style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: const Text(
|
||||
"分享",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.password!.tr, rightTitle:"98765432", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.name!.tr, rightTitle:"你好", isHaveDirection: true, isHaveLine: true, action:(){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"永久", isHaveDirection: true, action:(){
|
||||
Navigator.pushNamed(context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.password!.tr,
|
||||
rightTitle: "98765432",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
rightTitle: "你好",
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "永久",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.electronicKeyDetailChangeDate);
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.sender!.tr, rightTitle:"15080825640", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.senderTime!.tr, rightTitle:"2020.06.21 11:49", action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||
rightTitle: "15080825640",
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||
rightTitle: "2020.06.21 11:49",
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.operatingRecord!.tr, rightTitle:"", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget commonItem(String leftTitle, String rightTitle, {bool isHaveDirection = false, bool isHaveLine = false, bool isHaveRightWidget = false, Widget? rightWidget, Function()? action}){
|
||||
Widget commonItem(String leftTitle, String rightTitle,
|
||||
{bool isHaveDirection = false,
|
||||
bool isHaveLine = false,
|
||||
bool isHaveRightWidget = false,
|
||||
Widget? rightWidget,
|
||||
Function()? action}) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -75,27 +105,50 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
Container(
|
||||
// height: 80.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Text(leftTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Text(
|
||||
leftTitle,
|
||||
style:
|
||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
isHaveRightWidget?rightWidget!:Text(rightTitle, textAlign: TextAlign.end,style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),)
|
||||
isHaveRightWidget
|
||||
? rightWidget!
|
||||
: Text(
|
||||
rightTitle,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
isHaveDirection?Image.asset('images/icon_right.png', width: 50.w, height: 50.w,):SizedBox(width:10.w),
|
||||
SizedBox(width: 5.w),
|
||||
isHaveDirection
|
||||
? Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
)
|
||||
: SizedBox(width: 10.w),
|
||||
// SizedBox(width:10.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
isHaveLine?Container(height: 0.5.h, color: Colors.grey,):Container()
|
||||
isHaveLine
|
||||
? Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
: Container()
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -108,10 +161,13 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
return Card(
|
||||
color: const Color(0x00FFFFFF),
|
||||
child: CupertinoAlertDialog(
|
||||
title: Text("${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.password!.tr}"),
|
||||
title: Text(
|
||||
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.password!.tr}"),
|
||||
content: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10,),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
height: 80.h,
|
||||
// color: Colors.white,
|
||||
@ -171,5 +227,4 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -63,17 +63,19 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,13 +12,14 @@ import '../../../../translations/trans_lib.dart';
|
||||
class PasswordKeyPerpetualPage extends StatefulWidget {
|
||||
final String type;
|
||||
|
||||
const PasswordKeyPerpetualPage({Key? key, required this.type}) : super(key: key);
|
||||
const PasswordKeyPerpetualPage({Key? key, required this.type})
|
||||
: super(key: key);
|
||||
@override
|
||||
State<PasswordKeyPerpetualPage> createState() => _PasswordKeyPerpetualPageState();
|
||||
State<PasswordKeyPerpetualPage> createState() =>
|
||||
_PasswordKeyPerpetualPageState();
|
||||
}
|
||||
|
||||
class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
|
||||
final TextEditingController _controller = TextEditingController();
|
||||
|
||||
@override
|
||||
@ -29,10 +31,9 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
Widget indexChangeWidget(){
|
||||
Widget indexChangeWidget() {
|
||||
switch (int.parse(widget.type)) {
|
||||
case 0:
|
||||
{
|
||||
@ -40,7 +41,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// return sendElectronicKeySucceed();
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip1!.tr)
|
||||
],
|
||||
);
|
||||
@ -52,7 +56,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyTimeLimitWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip2!.tr)
|
||||
],
|
||||
);
|
||||
@ -63,7 +70,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// 单次
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip3!.tr)
|
||||
],
|
||||
);
|
||||
@ -75,8 +85,12 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyIfPerpetualWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.password!.tr, "请输入6-9位数字", _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.password!.tr,
|
||||
"请输入6-9位数字", _controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip4!.tr)
|
||||
],
|
||||
);
|
||||
@ -88,7 +102,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
return Column(
|
||||
children: [
|
||||
keyCirculationWidget(),
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip5!.tr)
|
||||
],
|
||||
);
|
||||
@ -99,7 +116,10 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
// 清空
|
||||
return Column(
|
||||
children: [
|
||||
perpetualKeyWidget(TranslationLoader.lanKeys!.name!.tr, TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr, _controller),
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
_controller),
|
||||
keyBottomWidget(TranslationLoader.lanKeys!.getPasswordTip6!.tr)
|
||||
],
|
||||
);
|
||||
@ -112,61 +132,86 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
}
|
||||
|
||||
// 密码命名输入框
|
||||
Widget perpetualKeyWidget(String titleStr, String rightTitle, TextEditingController controller){
|
||||
Widget perpetualKeyWidget(
|
||||
String titleStr, String rightTitle, TextEditingController controller) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(height: 10.h),
|
||||
CommonItem(leftTitel:titleStr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(rightTitle)),
|
||||
CommonItem(
|
||||
leftTitel: titleStr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(rightTitle)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 限时顶部选择日期
|
||||
Widget keyTimeLimitWidget(){
|
||||
Widget keyTimeLimitWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"2020.06.20 11:49", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"2020.06.20 11:49", isHaveDirection: true, action:(){
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 自定义是否永久
|
||||
Widget keyIfPerpetualWidget(){
|
||||
Widget keyIfPerpetualWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.permanent!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch()), action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.permanent!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 循环
|
||||
Widget keyCirculationWidget(){
|
||||
Widget keyCirculationWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.recursiveDevice!.tr, rightTitle:"周末", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.effectiveTime!.tr, rightTitle:"10:00", isHaveLine: true, isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.failureTime!.tr, rightTitle:"11:00", isHaveDirection: true, action:(){
|
||||
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.recursiveDevice!.tr,
|
||||
rightTitle: "周末",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "10:00",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "11:00",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget(String tipStr){
|
||||
Widget keyBottomWidget(String tipStr) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -174,21 +219,26 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(tipStr, textAlign: TextAlign.start,)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
tipStr,
|
||||
textAlign: TextAlign.start,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.getPassword!.tr, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
|
||||
}
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 发送电子钥匙成功
|
||||
Widget sendElectronicKeySucceed(){
|
||||
Widget sendElectronicKeySucceed() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
@ -197,31 +247,70 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.h,),
|
||||
Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w, color: AppColors.mainColor,),
|
||||
SizedBox(height: 20.h,),
|
||||
Text("操作成功,密码为",style: TextStyle(fontSize: 32.sp, color: Colors.black, fontWeight: FontWeight.w500),),
|
||||
SizedBox(height: 10.h,),
|
||||
Text("62689876",style: TextStyle(fontSize: 60.sp, color: Colors.black, fontWeight: FontWeight.w500),),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Image.asset(
|
||||
'images/main/icon_main_addLock.png',
|
||||
width: 150.w,
|
||||
height: 150.w,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Text(
|
||||
"操作成功,密码为",
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Text(
|
||||
"62689876",
|
||||
style: TextStyle(
|
||||
fontSize: 60.sp,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SubmitBtn(btnName: '完成', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SubmitBtn(btnName: '分享', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||
}),
|
||||
SubmitBtn(btnName: '标记为:已入住', fontSize: 28.sp, borderRadius: 20.w, margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w), padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: '完成',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
SubmitBtn(
|
||||
btnName: '分享',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.sendEmailNotificationPage);
|
||||
}),
|
||||
SubmitBtn(
|
||||
btnName: '标记为:已入住',
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(String tfStr){
|
||||
Widget getTFWidget(String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
@ -233,7 +322,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
textAlign:TextAlign.end,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
@ -243,22 +332,26 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w,),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ class StarLockMain extends StatefulWidget {
|
||||
State<StarLockMain> createState() => _StarLockMainState();
|
||||
}
|
||||
|
||||
class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
class _StarLockMainState extends State<StarLockMain> with BaseWidget {
|
||||
// final logic = Get.put(GetxBle());
|
||||
|
||||
StreamSubscription<DiscoveredDevice>? _streamSubscription;
|
||||
@ -41,21 +41,29 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
GetxBle.call.scanner.startScan([]);
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF5F5F5),
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:false, haveOtherLeftWidget: true, leftWidget: Builder(
|
||||
builder: (context) => IconButton(
|
||||
icon: Image.asset("images/main/mainLeft_menu_icon.png",color:Colors.white, width: 60.w, height: 60.w,),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
},
|
||||
)
|
||||
),backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.starLock!.tr,
|
||||
haveBack: false,
|
||||
haveOtherLeftWidget: true,
|
||||
leftWidget: Builder(
|
||||
builder: (context) => IconButton(
|
||||
icon: Image.asset(
|
||||
"images/main/mainLeft_menu_icon.png",
|
||||
color: Colors.white,
|
||||
width: 44.w,
|
||||
height: 44.w,
|
||||
),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openDrawer();
|
||||
},
|
||||
)),
|
||||
backgroundColor: AppColors.mainColor),
|
||||
drawer: Drawer(
|
||||
width:1.sw/3*2,
|
||||
width: 1.sw / 3 * 2,
|
||||
child: StarLockMinePage(),
|
||||
),
|
||||
body: getLockList(),
|
||||
@ -63,57 +71,75 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
);
|
||||
}
|
||||
|
||||
Widget getLockList(){
|
||||
Widget getLockList() {
|
||||
return ListView.builder(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
|
||||
Navigator.pushNamed(context, Routers.lockDetailPage);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
Widget nearbyLockItem(
|
||||
String lockTypeIcon, String lockTypeTitle, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 150.h,
|
||||
height: 122.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(20.w),
|
||||
),
|
||||
child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: 30.h,),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 30.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:20.w),
|
||||
Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:5.w),
|
||||
Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
|
||||
SizedBox(width:30.w),
|
||||
SizedBox(width: 20.w),
|
||||
Text(
|
||||
"100%",
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
SizedBox(width: 2.w),
|
||||
Image.asset(
|
||||
'images/main/icon_main_cell.png',
|
||||
width: 30.w,
|
||||
height: 24.w,
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(width:30.w),
|
||||
Text("永久/管理员", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width: 30.w),
|
||||
Text(
|
||||
"永久/管理员",
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -122,7 +148,7 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
);
|
||||
}
|
||||
|
||||
Widget unHaveData(){
|
||||
Widget unHaveData() {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@ -134,38 +160,46 @@ class _StarLockMainState extends State<StarLockMain> with BaseWidget{
|
||||
border: Border.all(width: 4, color: AppColors.mainColor),
|
||||
borderRadius: BorderRadius.circular(75),
|
||||
),
|
||||
child:InkWell(
|
||||
child: InkWell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(30.0),
|
||||
child: Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w,),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_addLock.png',
|
||||
width: 150.w,
|
||||
height: 150.w,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
//实现回调函数
|
||||
Navigator.pushNamed(context, Routers.seletLockTypePage,
|
||||
// arguments: {
|
||||
// "url": ConstConfig.privacAgreementUrl,
|
||||
// "title": '隐私政策'
|
||||
// }
|
||||
Navigator.pushNamed(
|
||||
context, Routers.seletLockTypePage,
|
||||
// arguments: {
|
||||
// "url": ConstConfig.privacAgreementUrl,
|
||||
// "title": '隐私政策'
|
||||
// }
|
||||
);
|
||||
},
|
||||
)
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: h(50.h),),
|
||||
SizedBox(
|
||||
height: h(50.h),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Text(TranslationLoader.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w800, color: AppColors.mainColor),)
|
||||
)
|
||||
child: Text(
|
||||
TranslationLoader
|
||||
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 30.sp,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: AppColors.mainColor),
|
||||
))
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
void onShow(){
|
||||
void onShow() {}
|
||||
|
||||
}
|
||||
|
||||
void onHide(){
|
||||
|
||||
}
|
||||
void onHide() {}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -20,23 +19,72 @@ class _AbountPageState extends State<AbountPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.about!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.about!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: 150.h,),
|
||||
SizedBox(
|
||||
height: 150.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset("images/icon_main_1024.png", width: 200.w, height: 200.w,),
|
||||
Image.asset(
|
||||
"images/icon_main_1024.png",
|
||||
width: 200.w,
|
||||
height: 200.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
const Text("通通锁 6.7.0"),
|
||||
SizedBox(height: 80.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.introduce!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(
|
||||
height: 80.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.introduce!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.userAgreement!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.privacyPolicy!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.personalInformationCollectionList!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.applicationPermissionDescription!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.thirdPartyInformationSharingList!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -37,7 +37,9 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
||||
children: [
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.lightTouchScreen!.tr,
|
||||
style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -57,7 +59,7 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
||||
children: [
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||
style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 20.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -17,20 +17,24 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", (){
|
||||
Navigator.pushNamed(context, Routers.lockAddressPage);
|
||||
});
|
||||
}
|
||||
),
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount: 20,
|
||||
itemBuilder: (c, index) {
|
||||
return nearbyLockItem(
|
||||
'images/icon_lockGroup_item.png', "MCBN01-ea9240", () {
|
||||
Navigator.pushNamed(context, Routers.lockAddressPage);
|
||||
});
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget nearbyLockItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
Widget nearbyLockItem(
|
||||
String lockTypeIcon, String lockTypeTitle, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Column(
|
||||
@ -41,33 +45,52 @@ class _NearbyLockPageState extends State<NearbyLockPage> {
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width:20.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(width:20.w),
|
||||
Image.asset('images/main/icon_main_addLock.png', width: 50.w, height: 50.w,),
|
||||
SizedBox(width:30.w),
|
||||
SizedBox(width: 20.w),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Image.asset(
|
||||
"images/mine/icon_mine_main_about.png",
|
||||
width: 22.w,
|
||||
height: 22.w,
|
||||
),
|
||||
Expanded(child: SizedBox(width: 20.w)),
|
||||
Image.asset(
|
||||
'images/main/icon_main_addLock.png',
|
||||
width: 28.w,
|
||||
height: 28.w,
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(height: 0.5.h, color: Colors.grey,)
|
||||
Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void onShow(){
|
||||
}
|
||||
void onShow() {}
|
||||
|
||||
void onHide(){
|
||||
}
|
||||
void onHide() {}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
padding: const EdgeInsets.only(left: 10, right: 10, bottom: 10),
|
||||
child: GridView.count(
|
||||
crossAxisCount: 2,
|
||||
childAspectRatio: 3,
|
||||
childAspectRatio: 2.83,
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 10,
|
||||
children: [
|
||||
@ -48,22 +48,24 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem(
|
||||
'images/lockType/lockType_intelligentLockCore.png',
|
||||
TranslationLoader.lanKeys!.intelligentLockCore!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
||||
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||
TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||
lockTypeItem(
|
||||
'images/lockType/lockType_intelligentLockCore.png',
|
||||
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
|
||||
() {
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
}),
|
||||
|
||||
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||
// TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||
// Navigator.pushNamed(context, Routers.addLockPage);
|
||||
// }),
|
||||
lockTypeItem('images/lockType/lockType_remoteControl.png',
|
||||
TranslationLoader.lanKeys!.longRangeControl!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.addLockPage);
|
||||
TranslationLoader.lanKeys!.gateway!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||
}),
|
||||
],
|
||||
),
|
||||
@ -83,7 +85,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
margin: const EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 40.w),
|
||||
SizedBox(width: 30.w),
|
||||
Image.asset(
|
||||
'images/lockType/lockType_allLocks.png',
|
||||
width: 88.w,
|
||||
@ -97,18 +99,19 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.allLock!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||
fontSize: 24.sp,
|
||||
)),
|
||||
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
||||
fontSize: 20.sp, color: AppColors.darkGrayTextColor)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 40.w),
|
||||
Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
'images/icon_right_grey.png',
|
||||
width: 12.w,
|
||||
height: 21.w,
|
||||
),
|
||||
SizedBox(width: 40.w),
|
||||
],
|
||||
@ -127,11 +130,11 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
// margin: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 20.w),
|
||||
SizedBox(width: 30.w),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 40.w,
|
||||
height: 57.w,
|
||||
width: 32.w,
|
||||
height: 48.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
@ -141,15 +144,15 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
children: [
|
||||
Text(lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||
fontSize: 22.sp, color: AppColors.blackColor)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
'images/icon_right_grey.png',
|
||||
width: 12.w,
|
||||
height: 21.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
],
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,10 +13,12 @@ class GatewayConfigurationWifiPage extends StatefulWidget {
|
||||
const GatewayConfigurationWifiPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<GatewayConfigurationWifiPage> createState() => _GatewayConfigurationWifiPageState();
|
||||
State<GatewayConfigurationWifiPage> createState() =>
|
||||
_GatewayConfigurationWifiPageState();
|
||||
}
|
||||
|
||||
class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiPage> {
|
||||
class _GatewayConfigurationWifiPageState
|
||||
extends State<GatewayConfigurationWifiPage> {
|
||||
final _wifiPassward = TextEditingController();
|
||||
final _gatewayNamePassward = TextEditingController();
|
||||
|
||||
@ -23,80 +26,159 @@ class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiP
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
color: const Color(0xFFF2F6F9),
|
||||
padding: EdgeInsets.all(15.h),
|
||||
child: Text(TranslationLoader.lanKeys!.gatewayConfigurationWifiTip!.tr)
|
||||
),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.gatewayConfigurationWifiTip!.tr)),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiName!.tr, rightTitle:"XinHongJia", allHeight:100.h, isHaveLine: true, isHaveDirection: true, action: (){
|
||||
// Navigator.pushNamed(context, Routers.minePersonInfoSetSafetyProblemPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiPassward!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(_wifiPassward, TranslationLoader.lanKeys!.pleaseEnterTheWiFiPassword!.tr)),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.gatewayName!.tr, rightTitle:"", isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnterGatewayName!.tr)),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiMAC!.tr, rightTitle:"48:55:19:7d:84:7a", allHeight:100.h, isHaveLine: false),
|
||||
SizedBox(height: 10.h,),
|
||||
Visibility(
|
||||
visible: true ,
|
||||
child:Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.ipAddress!.tr, rightTitle:"192.168.1.1", allHeight:100.h, isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.subnetMask!.tr, rightTitle:"255.255.255.0", allHeight:100.h, isHaveLine: true),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.defaultGateway!.tr, rightTitle:"192.168.1.1", allHeight:100.h, isHaveLine: true),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.automaticallyGetTheDNSServerAddress!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: Container(width: 80.w, height: 50.h,child: _switch())),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child:Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.preferredDNS!.tr, rightTitle:"", isHaveLine: true, isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.alternativeDNS!.tr, rightTitle:"", isHaveLine: false, isHaveRightWidget: true, rightWidget: getTFWidget(_gatewayNamePassward, TranslationLoader.lanKeys!.pleaseEnter!.tr)),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
SizedBox(height: 50.h,),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
||||
onClick: (){
|
||||
// Navigator.pushNamed(context, Routers.seletGatewayPage);
|
||||
}
|
||||
),
|
||||
SizedBox(height: 10.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: SizedBox(
|
||||
// width: 150.w,
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text(TranslationLoader.lanKeys!.noStaticIPIsUsed!.tr,style: TextStyle(fontSize: 28.sp, color: AppColors.mainColor)),
|
||||
),
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.wifiName!.tr,
|
||||
rightTitle: "XinHongJia",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// Navigator.pushNamed(context, Routers.minePersonInfoSetSafetyProblemPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.wifiPassward!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_wifiPassward,
|
||||
TranslationLoader
|
||||
.lanKeys!.pleaseEnterTheWiFiPassword!.tr)),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.gatewayName!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(_gatewayNamePassward,
|
||||
TranslationLoader.lanKeys!.pleaseEnterGatewayName!.tr)),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.wifiMAC!.tr,
|
||||
rightTitle: "48:55:19:7d:84:7a",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: false),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.ipAddress!.tr,
|
||||
rightTitle: "192.168.1.1",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: true),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.subnetMask!.tr,
|
||||
rightTitle: "255.255.255.0",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: true),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
TranslationLoader.lanKeys!.defaultGateway!.tr,
|
||||
rightTitle: "192.168.1.1",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: true),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!
|
||||
.automaticallyGetTheDNSServerAddress!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(
|
||||
width: 80.w, height: 50.h, child: _switch())),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.preferredDNS!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_gatewayNamePassward,
|
||||
TranslationLoader
|
||||
.lanKeys!.pleaseEnter!.tr)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.alternativeDNS!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_gatewayNamePassward,
|
||||
TranslationLoader
|
||||
.lanKeys!.pleaseEnter!.tr)),
|
||||
],
|
||||
)),
|
||||
],
|
||||
)),
|
||||
SizedBox(
|
||||
height: 50.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
||||
onClick: () {
|
||||
// Navigator.pushNamed(context, Routers.seletGatewayPage);
|
||||
}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: SizedBox(
|
||||
// width: 150.w,
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.noStaticIPIsUsed!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, color: AppColors.mainColor)),
|
||||
),
|
||||
onTap: (){
|
||||
// Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 50.h,),
|
||||
],
|
||||
onTap: () {
|
||||
// Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 50.h,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -105,7 +187,7 @@ class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiP
|
||||
}
|
||||
|
||||
// 接受者信息输入框
|
||||
Widget getTFWidget(TextEditingController controller, String tfStr){
|
||||
Widget getTFWidget(TextEditingController controller, String tfStr) {
|
||||
return SizedBox(
|
||||
height: 50.h,
|
||||
width: 400.w,
|
||||
@ -117,7 +199,7 @@ class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiP
|
||||
maxLines: 1,
|
||||
controller: controller,
|
||||
autofocus: false,
|
||||
textAlign:TextAlign.end,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
@ -127,22 +209,26 @@ class _GatewayConfigurationWifiPageState extends State<GatewayConfigurationWifiP
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w,),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Switch _switch(){
|
||||
return Switch(
|
||||
value: false,
|
||||
onChanged: (value){
|
||||
// switchValue = !switchValue;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -18,36 +17,52 @@ class SeletGatewayListPage extends StatefulWidget {
|
||||
class _SeletGatewayListPageState extends State<SeletGatewayListPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.selectGateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.selectGateway!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "G2 41c21c", "-34", (){
|
||||
Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _seletGatewayListListItem(
|
||||
'images/mine/icon_mine_gatewayListMainIcon.png',
|
||||
"G2 41c21c",
|
||||
"-34", () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.gatewayConfigurationWifiPage);
|
||||
});
|
||||
}
|
||||
),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action){
|
||||
Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName,
|
||||
String networkSignal, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
// height: 100.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 16.h, bottom: 16.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 10.w,),
|
||||
Image.asset(lockTypeIcon, width: 80.w, height: 80.w,),
|
||||
SizedBox(width: 20.w,),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -57,32 +72,50 @@ class _SeletGatewayListPageState extends State<SeletGatewayListPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
gateWayName,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height:5.h),
|
||||
SizedBox(height: 5.h),
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||
SizedBox(width: 10.w,),
|
||||
Text(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_gatewaySignal_strong.png',
|
||||
width: 22.w,
|
||||
height: 22.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Text(
|
||||
networkSignal,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:20.h),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width:20.h),
|
||||
Image.asset('images/icon_add_white.png', width: 70.w, height: 70.w, color: AppColors.mainColor,),
|
||||
SizedBox(width: 20.w,),
|
||||
SizedBox(width: 20.h),
|
||||
Image.asset(
|
||||
'images/icon_add_white.png',
|
||||
width: 36.w,
|
||||
height: 36.w,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -20,36 +19,52 @@ class _SeletGatewayTypePageState extends State<SeletGatewayTypePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.selectGatewayType!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.selectGatewayType!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
_seletGatewayType('images/mine/icon_mine_seletGatewayType_G2.png', "G2(Wi-Fi)", (){
|
||||
_seletGatewayType(
|
||||
'images/mine/icon_mine_seletGatewayType_G2.png', "G2(Wi-Fi)",
|
||||
() {
|
||||
Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage);
|
||||
}),
|
||||
SizedBox(height: 2.h,),
|
||||
_seletGatewayType('images/mine/icon_mine_seletGatewayType_G4.png', "G4(4G) ", (){
|
||||
SizedBox(
|
||||
height: 2.h,
|
||||
),
|
||||
_seletGatewayType(
|
||||
'images/mine/icon_mine_seletGatewayType_G4.png', "G4(4G) ",
|
||||
() {
|
||||
Navigator.pushNamed(context, Routers.seletGatewayTypeNextTipPage);
|
||||
}),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget _seletGatewayType(String iconStr, String gatewayType, Function() action){
|
||||
Widget _seletGatewayType(
|
||||
String iconStr, String gatewayType, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
width: 1.sw,
|
||||
height: 200.h,
|
||||
height: 140.h,
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(iconStr, width: 150.w, height: 150.w,),
|
||||
SizedBox(width: 30.w),
|
||||
Text(gatewayType)
|
||||
Image.asset(
|
||||
iconStr,
|
||||
width: 150.w,
|
||||
height: 150.w,
|
||||
),
|
||||
// SizedBox(width: 20.w),
|
||||
Text(
|
||||
gatewayType,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -13,48 +12,62 @@ class SeletGatewayTypeNextTipPage extends StatefulWidget {
|
||||
const SeletGatewayTypeNextTipPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<SeletGatewayTypeNextTipPage> createState() => _SeletGatewayTypeNextTipPageState();
|
||||
State<SeletGatewayTypeNextTipPage> createState() =>
|
||||
_SeletGatewayTypeNextTipPageState();
|
||||
}
|
||||
|
||||
class _SeletGatewayTypeNextTipPageState extends State<SeletGatewayTypeNextTipPage> {
|
||||
class _SeletGatewayTypeNextTipPageState
|
||||
extends State<SeletGatewayTypeNextTipPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addGateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.addGateway!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
SizedBox(height: 40.h),
|
||||
Center(child: Text(TranslationLoader.lanKeys!.turnThePowerBackOn!.tr, style: TextStyle(fontSize: 34.sp, fontWeight: FontWeight.w500),)),
|
||||
Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.turnThePowerBackOn!.tr,
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)),
|
||||
SizedBox(height: 80.h),
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 40.h,
|
||||
left: 190.w,
|
||||
child: Text(TranslationLoader.lanKeys!.indicatorLight!.tr)
|
||||
),
|
||||
Image.asset("images/mine/icon_mine_seletGatewayType_next.png", width: 300.w, height: 300.w),
|
||||
bottom: 50.h,
|
||||
left: 120.w,
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.indicatorLight!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
Image.asset("images/mine/icon_mine_seletGatewayType_next.png",
|
||||
width: 220.w, height: 220.w),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
Container(
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Center(child: Text(TranslationLoader.lanKeys!.seletGatewayTypeNextTip!.tr, textAlign: TextAlign.center,)))
|
||||
,
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.seletGatewayTypeNextTip!.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 18.sp),
|
||||
))),
|
||||
SizedBox(height: 40.w),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
|
||||
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
||||
onClick: (){
|
||||
Navigator.pushNamed(context, Routers.seletGatewayPage);
|
||||
}
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.seletGatewayPage);
|
||||
}),
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -25,32 +24,63 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.designation!.tr, rightTitle:"星锁网关", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.state!.tr, rightTitle:"在线", isHaveLine: true, isHaveDirection: false),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.wifiName!.tr, rightTitle:"XinHongJia", isHaveLine: true, isHaveDirection: false),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.networkMAC!.tr, rightTitle:"39:23:df:34:12", isHaveLine: false, isHaveDirection: false),
|
||||
SizedBox(height: 10.h,),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.nearbyLock!.tr, rightTitle:"2", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.gatewayConnectionLockPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.gatewayUpgrade!.tr, rightTitle:"", isHaveLine: false, isHaveDirection: true, action: (){
|
||||
|
||||
}),
|
||||
SizedBox(height: 80.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.designation!.tr,
|
||||
rightTitle: "星锁网关",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.state!.tr,
|
||||
rightTitle: "在线",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: false),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.wifiName!.tr,
|
||||
rightTitle: "XinHongJia",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: false),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.networkMAC!.tr,
|
||||
rightTitle: "39:23:df:34:12",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: false),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||
rightTitle: "2",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(context, Routers.gatewayConnectionLockPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.gatewayUpgrade!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
SizedBox(
|
||||
height: 80.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w),
|
||||
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -61,7 +91,11 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(title:"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}", tipTitle:"请输入", controller: _changeGatewayNameController);
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
|
||||
tipTitle: "请输入",
|
||||
controller: _changeGatewayNameController);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,8 +30,8 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
},
|
||||
child: Image.asset(
|
||||
'images/icon_add_white.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
)),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
@ -60,7 +60,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
// height: 100.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 18.h, bottom: 18.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
@ -89,8 +89,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
children: [
|
||||
Text(
|
||||
gateWayName,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -102,24 +101,23 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_gatewayListOnline.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
width: 22.w,
|
||||
height: 22.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Text(
|
||||
"在线",
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 18.sp),
|
||||
),
|
||||
SizedBox(
|
||||
width: 80.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_gatewayListNumber.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
width: 22.w,
|
||||
height: 22.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
@ -127,7 +125,7 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
Text(
|
||||
"2",
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
fontSize: 18.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -22,31 +22,83 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.personalInformation!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.avatar!.tr, rightTitle:"", allHeight: 100.h, isHaveLine: true,isHaveDirection: true,isHaveRightWidget:true, rightWidget: Container(width: 75.w, height: 75.h,child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png')), action: (){
|
||||
_openModalBottomSheet();
|
||||
},),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.nickName!.tr, rightTitle:"你好", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoEditNamePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.accountNumber!.tr, rightTitle:"786612630@qq.com", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoEditAccountPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.iphone!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoEditIphonePage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.resetPasswords!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoResetPasswordPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.safetyProblem!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoSetSafetyProblemPage);
|
||||
}),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.countryAndRegion!.tr, rightTitle:"中国", isHaveLine: false, isHaveDirection: false),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.avatar!.tr,
|
||||
rightTitle: "",
|
||||
allHeight: 100.h,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(),
|
||||
/*
|
||||
Container(
|
||||
width: 75.w,
|
||||
height: 75.h,
|
||||
child: Image.asset(
|
||||
'images/mine/icon_mine_main_defaultAvatar.png')),
|
||||
*/
|
||||
action: () {
|
||||
_openModalBottomSheet();
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.nickName!.tr,
|
||||
rightTitle: "你好",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoEditNamePage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
|
||||
rightTitle: "786612630@qq.com",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoEditAccountPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.email!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoEditEmailPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.resetPasswords!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoResetPasswordPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoSetSafetyProblemPage);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: "中国",
|
||||
isHaveLine: false,
|
||||
isHaveDirection: false),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Future _openModalBottomSheet() async {
|
||||
@ -82,8 +134,6 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,69 +12,79 @@ class MinePersonInfoEditAccountPage extends StatefulWidget {
|
||||
const MinePersonInfoEditAccountPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoEditAccountPage> createState() => _MinePersonInfoEditAccountPageState();
|
||||
State<MinePersonInfoEditAccountPage> createState() =>
|
||||
_MinePersonInfoEditAccountPageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoEditAccountPageState extends State<MinePersonInfoEditAccountPage> {
|
||||
class _MinePersonInfoEditAccountPageState
|
||||
extends State<MinePersonInfoEditAccountPage> {
|
||||
final TextEditingController _editAccountController = TextEditingController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
color: Colors.grey.shade300,
|
||||
padding: EdgeInsets.only(left:15.w, top: 10.h, bottom: 10.h),
|
||||
child: Text(TranslationLoader.lanKeys!.modifyAccountTip!.tr)
|
||||
),
|
||||
width: 1.sw,
|
||||
color: AppColors.greyBackgroundColor,
|
||||
padding: EdgeInsets.only(left: 15.w, top: 10.h, bottom: 10.h),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.modifyAccountTip!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
padding: EdgeInsets.all(20.h),
|
||||
height: 110.h,
|
||||
child: TextField(
|
||||
maxLines: 1,
|
||||
// maxLines: 1,
|
||||
keyboardType: TextInputType.text,
|
||||
// inputFormatters: inputFormatterstters??[],
|
||||
controller:_editAccountController,
|
||||
controller: _editAccountController,
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.start,
|
||||
style:TextStyle(
|
||||
height: 1.1,
|
||||
fontSize: 30.sp,
|
||||
style: TextStyle(
|
||||
height: 3.2,
|
||||
fontSize: 22.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: const Color(0xFF333333)
|
||||
),
|
||||
color: const Color(0xFF333333)),
|
||||
decoration: InputDecoration(
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(
|
||||
height: 1.1,
|
||||
fontSize: 30.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: const Color(0xFF999999)
|
||||
),
|
||||
// height: 3.0,
|
||||
fontSize: 22.sp,
|
||||
color: const Color(0xFF999999)),
|
||||
// labelText:"label",
|
||||
labelStyle: const TextStyle(color: Color(0xFF999999)),
|
||||
border: const OutlineInputBorder(
|
||||
///设置边框四个角的弧度
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
|
||||
///用来配置边框的样式
|
||||
borderSide: BorderSide(
|
||||
///设置边框的颜色
|
||||
color: Color(0xffD3D3D3),
|
||||
|
||||
///设置边框的粗细
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
|
||||
///设置输入框可编辑时的边框样式
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
///设置边框四个角的弧度
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
|
||||
///用来配置边框的样式
|
||||
borderSide: BorderSide(
|
||||
///设置边框的颜色
|
||||
color: Color(0xffD3D3D3),
|
||||
|
||||
///设置边框的粗细
|
||||
width: 1,
|
||||
),
|
||||
@ -82,37 +92,43 @@ class _MinePersonInfoEditAccountPageState extends State<MinePersonInfoEditAccoun
|
||||
disabledBorder: const OutlineInputBorder(
|
||||
///设置边框四个角的弧度
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
|
||||
///用来配置边框的样式
|
||||
borderSide: BorderSide(
|
||||
///设置边框的颜色
|
||||
color: Color(0xffD3D3D3),
|
||||
|
||||
///设置边框的粗细
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
|
||||
///用来配置输入框获取焦点时的颜色
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
///设置边框四个角的弧度
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
|
||||
///用来配置边框的样式
|
||||
borderSide: BorderSide(
|
||||
///设置边框的颜色
|
||||
color: Color(0xffD3D3D3),
|
||||
|
||||
///设置边框的粗细
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
obscureText:false,
|
||||
onChanged: (String value){
|
||||
|
||||
},
|
||||
obscureText: false,
|
||||
onChanged: (String value) {},
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.next!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoEditAccountNextPage);
|
||||
}),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
onClick: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.minePersonInfoEditAccountNextPage);
|
||||
}),
|
||||
SizedBox(height: 50.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
@ -123,18 +139,21 @@ class _MinePersonInfoEditAccountPageState extends State<MinePersonInfoEditAccoun
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(fontSize: 24.sp)),
|
||||
child: Text(
|
||||
'${TranslationLoader.lanKeys!.forgetPassword!.tr}?',
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp, color: AppColors.mainColor)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.starLockForgetPasswordPage);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -16,10 +15,12 @@ class MinePersonInfoEditAccountNextPage extends StatefulWidget {
|
||||
const MinePersonInfoEditAccountNextPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoEditAccountNextPage> createState() => _MinePersonInfoEditAccountNextPageState();
|
||||
State<MinePersonInfoEditAccountNextPage> createState() =>
|
||||
_MinePersonInfoEditAccountNextPageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoEditAccountNextPageState extends State<MinePersonInfoEditAccountNextPage> {
|
||||
class _MinePersonInfoEditAccountNextPageState
|
||||
extends State<MinePersonInfoEditAccountNextPage> {
|
||||
final TextEditingController _editAccountController = TextEditingController();
|
||||
late Timer _timer;
|
||||
int _seconds = 60;
|
||||
@ -28,53 +29,77 @@ class _MinePersonInfoEditAccountNextPageState extends State<MinePersonInfoEditAc
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
// color: Colors.grey,
|
||||
padding: EdgeInsets.only(left:30.w, top: 15.h, bottom: 15.h),
|
||||
child: Text(TranslationLoader.lanKeys!.pleaseEnterAccountNumber!.tr, style: TextStyle(fontWeight: FontWeight.w600),)
|
||||
padding: EdgeInsets.only(left: 30.w, top: 15.h, bottom: 15.h),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.pleaseEnterNewAccountNumber!.tr,
|
||||
style:
|
||||
TextStyle(fontWeight: FontWeight.w600, fontSize: 24.sp),
|
||||
)),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 10.h, bottom: 10.h),
|
||||
child: TFInputHaveBorder(
|
||||
controller: _editAccountController,
|
||||
label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left:30.w, right:30.w, top: 10.h, bottom: 10.h),
|
||||
child: TFInputHaveBorder(controller: _editAccountController, label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left:30.w, right:30.w, top: 20.h, bottom: 10.h),
|
||||
child: TFInputHaveBorder(controller: _editAccountController, label: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", rightSlot:GestureDetector(
|
||||
child: Container(
|
||||
width: 180.w,
|
||||
height: 90.h,
|
||||
padding: EdgeInsets.all(5.h),
|
||||
margin: EdgeInsets.only(right: 10.w),
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColors.mainColor,
|
||||
// borderRadius: BorderRadius.circular(5)
|
||||
// ),
|
||||
child: Center(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 26.sp,
|
||||
)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
if(_seconds==60){
|
||||
// _setVerify();
|
||||
}else{
|
||||
// Toast.show(msg: '正在获取验证码');
|
||||
}
|
||||
},
|
||||
)),
|
||||
padding: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 20.h, bottom: 10.h),
|
||||
child: TFInputHaveBorder(
|
||||
controller: _editAccountController,
|
||||
label:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
rightSlot: GestureDetector(
|
||||
child: Container(
|
||||
width: 180.w,
|
||||
height: 90.h,
|
||||
padding: EdgeInsets.all(5.h),
|
||||
margin: EdgeInsets.only(right: 10.w),
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColors.mainColor,
|
||||
// borderRadius: BorderRadius.circular(5)
|
||||
// ),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_seconds == 60
|
||||
? '${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}'
|
||||
: (_seconds < 10)
|
||||
? '0$_seconds s'
|
||||
: '$_seconds s',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 26.sp,
|
||||
)),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (_seconds == 60) {
|
||||
// _setVerify();
|
||||
} else {
|
||||
// Toast.show(msg: '正在获取验证码');
|
||||
}
|
||||
},
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -16,10 +15,12 @@ class MinePersonInfoEditIphonePage extends StatefulWidget {
|
||||
const MinePersonInfoEditIphonePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoEditIphonePage> createState() => _MinePersonInfoEditIphonePageState();
|
||||
State<MinePersonInfoEditIphonePage> createState() =>
|
||||
_MinePersonInfoEditIphonePageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoEditIphonePageState extends State<MinePersonInfoEditIphonePage> {
|
||||
class _MinePersonInfoEditIphonePageState
|
||||
extends State<MinePersonInfoEditIphonePage> {
|
||||
final TextEditingController _phoneController = TextEditingController();
|
||||
final TextEditingController _codeController = TextEditingController();
|
||||
late Timer _timer;
|
||||
@ -29,18 +30,23 @@ class _MinePersonInfoEditIphonePageState extends State<MinePersonInfoEditIphoneP
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.iphone!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.iphone!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
padding: EdgeInsets.only(top: 5.h, bottom: 5.h),
|
||||
child: Text(TranslationLoader.lanKeys!.changeIphoneTip!.tr)
|
||||
),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.changeIphoneTip!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, Routers.seletCountryRegionPage);
|
||||
},
|
||||
child: Container(
|
||||
@ -49,35 +55,66 @@ class _MinePersonInfoEditIphonePageState extends State<MinePersonInfoEditIphoneP
|
||||
// padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:5.w),
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500))),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 5.w),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
fontWeight: FontWeight.w500))),
|
||||
SizedBox(width: 20.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text("中国+86", textAlign: TextAlign.end, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500),)
|
||||
Text(
|
||||
"中国+86",
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(width:5.w),
|
||||
Image.asset('images/icon_right.png', width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 5.w),
|
||||
Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(height: 0.5.h, color: Colors.grey,),
|
||||
Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
),
|
||||
SizedBox(height: 10.w),
|
||||
LoginInput(controller: _phoneController, isPwd: true, leftWidget:const SizedBox(), hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
LoginInput(
|
||||
controller: _phoneController,
|
||||
isPwd: true,
|
||||
leftWidget: const SizedBox(),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.sure!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: LoginInput(controller: _codeController, isPwd: true, leftWidget:const SizedBox(), hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}",inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
child: LoginInput(
|
||||
controller: _codeController,
|
||||
isPwd: true,
|
||||
leftWidget: const SizedBox(),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
SizedBox(width: 20.w,),
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
width: 180.w,
|
||||
@ -85,19 +122,25 @@ class _MinePersonInfoEditIphonePageState extends State<MinePersonInfoEditIphoneP
|
||||
padding: EdgeInsets.all(8.h),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.mainColor,
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
child: Center(
|
||||
child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.sp,
|
||||
)),
|
||||
child: Text(
|
||||
_seconds == 60
|
||||
? '${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}'
|
||||
: (_seconds < 10)
|
||||
? '0$_seconds s'
|
||||
: '$_seconds s',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.sp,
|
||||
)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
if(_seconds==60){
|
||||
onTap: () {
|
||||
if (_seconds == 60) {
|
||||
// _setVerify();
|
||||
}else{
|
||||
} else {
|
||||
// Toast.show(msg: '正在获取验证码');
|
||||
}
|
||||
},
|
||||
@ -105,12 +148,14 @@ class _MinePersonInfoEditIphonePageState extends State<MinePersonInfoEditIphoneP
|
||||
],
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,33 +11,48 @@ class MinePersonInfoEditNamePage extends StatefulWidget {
|
||||
const MinePersonInfoEditNamePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoEditNamePage> createState() => _MinePersonInfoEditNamePageState();
|
||||
State<MinePersonInfoEditNamePage> createState() =>
|
||||
_MinePersonInfoEditNamePageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoEditNamePageState extends State<MinePersonInfoEditNamePage> {
|
||||
final TextEditingController _changeNickNameController = TextEditingController();
|
||||
class _MinePersonInfoEditNamePageState
|
||||
extends State<MinePersonInfoEditNamePage> {
|
||||
final TextEditingController _changeNickNameController =
|
||||
TextEditingController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.changeNickName!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.save!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),],
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.save!.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body:Container(
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(15.w),
|
||||
child: Column(
|
||||
children: [
|
||||
LoginInput(controller: _changeNickNameController, isPwd: true, leftWidget:SizedBox(width: 15.w), hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}",inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
LoginInput(
|
||||
controller: _changeNickNameController,
|
||||
isPwd: true,
|
||||
leftWidget: SizedBox(width: 15.w),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.accountNumber!.tr}",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,117 @@
|
||||
import 'dart:async';
|
||||
|
||||
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/submitBtn.dart';
|
||||
import '../../../tools/tf_loginInput.dart';
|
||||
import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class MinePersonInfoEditEmailPage extends StatefulWidget {
|
||||
const MinePersonInfoEditEmailPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoEditEmailPage> createState() =>
|
||||
_MinePersonInfoEditEmailPageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoEditEmailPageState
|
||||
extends State<MinePersonInfoEditEmailPage> {
|
||||
final TextEditingController _phoneController = TextEditingController();
|
||||
final TextEditingController _codeController = TextEditingController();
|
||||
late Timer _timer;
|
||||
int _seconds = 60;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.email!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
padding: EdgeInsets.only(top: 5.h, bottom: 5.h),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.changeEmailTip!.tr,
|
||||
style: TextStyle(fontSize: 20.sp),
|
||||
)),
|
||||
LoginInput(
|
||||
controller: _phoneController,
|
||||
isPwd: true,
|
||||
leftWidget: const SizedBox(),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.email!.tr}",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
SizedBox(height: 10.w),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: LoginInput(
|
||||
controller: _codeController,
|
||||
isPwd: true,
|
||||
leftWidget: const SizedBox(),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
width: 140.w,
|
||||
// height: 60.h,
|
||||
padding: EdgeInsets.all(8.h),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.mainColor,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_seconds == 60
|
||||
? '${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}'
|
||||
: (_seconds < 10)
|
||||
? '0$_seconds s'
|
||||
: '$_seconds s',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 22.sp,
|
||||
)),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (_seconds == 60) {
|
||||
// _setVerify();
|
||||
} else {
|
||||
// Toast.show(msg: '正在获取验证码');
|
||||
}
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -13,10 +13,12 @@ class MinePersonInfoResetPasswordPage extends StatefulWidget {
|
||||
const MinePersonInfoResetPasswordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoResetPasswordPage> createState() => _MinePersonInfoResetPasswordPageState();
|
||||
State<MinePersonInfoResetPasswordPage> createState() =>
|
||||
_MinePersonInfoResetPasswordPageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoResetPasswordPageState extends State<MinePersonInfoResetPasswordPage> {
|
||||
class _MinePersonInfoResetPasswordPageState
|
||||
extends State<MinePersonInfoResetPasswordPage> {
|
||||
final TextEditingController _oldPwdController = TextEditingController();
|
||||
final TextEditingController _newPwdController = TextEditingController();
|
||||
final TextEditingController _surePwdController = TextEditingController();
|
||||
@ -25,49 +27,63 @@ class _MinePersonInfoResetPasswordPageState extends State<MinePersonInfoResetPas
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
margin: EdgeInsets.only(left:30.w, right: 30.w),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
LoginInput(
|
||||
controller: _oldPwdController,
|
||||
isPwd: true,
|
||||
leftWidget:Text("${TranslationLoader.lanKeys!.originalPassword!.tr} "),
|
||||
leftWidget: Text(
|
||||
"${TranslationLoader.lanKeys!.originalPassword!.tr} ",
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
hintText: "",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]
|
||||
),
|
||||
]),
|
||||
LoginInput(
|
||||
controller: _newPwdController,
|
||||
isPwd: true,
|
||||
leftWidget:Text("${TranslationLoader.lanKeys!.newPassword!.tr} "),
|
||||
leftWidget: Text(
|
||||
"${TranslationLoader.lanKeys!.newPassword!.tr} ",
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
hintText: "",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]
|
||||
),
|
||||
]),
|
||||
LoginInput(
|
||||
controller: _surePwdController,
|
||||
isPwd: true,
|
||||
// isHaveLeftWidget: false,
|
||||
leftWidget:Text("${TranslationLoader.lanKeys!.surePassword!.tr} "),
|
||||
leftWidget: Text(
|
||||
"${TranslationLoader.lanKeys!.surePassword!.tr} ",
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
hintText: "",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]
|
||||
),
|
||||
]),
|
||||
Container(
|
||||
width: 1.sw,
|
||||
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
|
||||
child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(fontSize: 26.w))
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.save!.tr, fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){
|
||||
|
||||
}),
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 18.w, color: AppColors.darkGrayTextColor))),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.save!.tr,
|
||||
fontSize: 30.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
SizedBox(height: 40.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
@ -77,18 +93,21 @@ class _MinePersonInfoResetPasswordPageState extends State<MinePersonInfoResetPas
|
||||
height: 50.h,
|
||||
// color: Colors.red,
|
||||
child: Center(
|
||||
child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(color:AppColors.mainColor, fontSize: 24.sp)),
|
||||
child: Text(
|
||||
'${TranslationLoader.lanKeys!.forgetPassword!.tr}?',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 18.sp)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.starLockForgetPasswordPage);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,10 +13,12 @@ class MinePersonInfoSetSafetyProblemPage extends StatefulWidget {
|
||||
const MinePersonInfoSetSafetyProblemPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MinePersonInfoSetSafetyProblemPage> createState() => _MinePersonInfoSetSafetyProblemPageState();
|
||||
State<MinePersonInfoSetSafetyProblemPage> createState() =>
|
||||
_MinePersonInfoSetSafetyProblemPageState();
|
||||
}
|
||||
|
||||
class _MinePersonInfoSetSafetyProblemPageState extends State<MinePersonInfoSetSafetyProblemPage> {
|
||||
class _MinePersonInfoSetSafetyProblemPageState
|
||||
extends State<MinePersonInfoSetSafetyProblemPage> {
|
||||
final _fristEditingController = TextEditingController();
|
||||
final _secondEditingController = TextEditingController();
|
||||
final _thirdEditingController = TextEditingController();
|
||||
@ -25,45 +27,61 @@ class _MinePersonInfoSetSafetyProblemPageState extends State<MinePersonInfoSetSa
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:ListView(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
Container(
|
||||
width: 1.sw,
|
||||
color: Colors.grey.shade300,
|
||||
color: AppColors.greyBackgroundColor,
|
||||
padding: EdgeInsets.all(20.h),
|
||||
child: Text(TranslationLoader.lanKeys!.safetyProblemTip!.tr)
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.safetyProblemTip!.tr,
|
||||
style: TextStyle(fontSize: 18.sp),
|
||||
)),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemOne!.tr, "",
|
||||
_fristEditingController, () {
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(height: 10.h),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemTwo!.tr, "",
|
||||
_secondEditingController, () {
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(height: 10.h),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemThree!.tr, "",
|
||||
_thirdEditingController, () {
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(
|
||||
height: 50.h,
|
||||
),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemOne!.tr, "", _fristEditingController, (){
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(height: 10.h),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemTwo!.tr, "", _secondEditingController, (){
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(height: 10.h),
|
||||
_safityProblemItem(TranslationLoader.lanKeys!.problemThree!.tr, "", _thirdEditingController, (){
|
||||
_seletProblemBottomSheet();
|
||||
}),
|
||||
SizedBox(height: 50.h,),
|
||||
SubmitBtn(btnName:TranslationLoader.lanKeys!.sure!.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(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.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: () {}),
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget _safityProblemItem(String problemTitle, String answerTitle,TextEditingController controller, Function() action){
|
||||
Widget _safityProblemItem(String problemTitle, String answerTitle,
|
||||
TextEditingController controller, Function() action) {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(leftTitel:problemTitle, rightTitle:"", isHaveLine: true, isHaveDirection: true, action:action),
|
||||
CommonItem(
|
||||
leftTitel: problemTitle,
|
||||
rightTitle: "",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: action),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(left: 35.w),
|
||||
@ -73,14 +91,14 @@ class _MinePersonInfoSetSafetyProblemPageState extends State<MinePersonInfoSetSa
|
||||
controller: controller,
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
// contentPadding: const EdgeInsets.only(top: 8.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
// labelText: label,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnterYourAnswer!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
obscureText:false,
|
||||
//输入里面输入文字内边距设置
|
||||
// contentPadding: const EdgeInsets.only(top: 8.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
// labelText: label,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnterYourAnswer!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(fontSize: 22.sp)),
|
||||
obscureText: false,
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -95,27 +113,27 @@ class _MinePersonInfoSetSafetyProblemPageState extends State<MinePersonInfoSetSa
|
||||
height: 400.0.h,
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
ListTile(title: Text('你第一次乘坐飞机取得是哪个城市?', textAlign: TextAlign.center),
|
||||
ListTile(
|
||||
title: Text('你第一次乘坐飞机取得是哪个城市?', textAlign: TextAlign.center),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
),
|
||||
ListTile(title: Text('你的QQ号码是多少', textAlign: TextAlign.center),
|
||||
ListTile(
|
||||
title: Text('你的QQ号码是多少', textAlign: TextAlign.center),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
),
|
||||
ListTile(title: Text('你的第一个宠物叫什么名字', textAlign: TextAlign.center),
|
||||
ListTile(
|
||||
title: Text('你的第一个宠物叫什么名字', textAlign: TextAlign.center),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -13,79 +12,120 @@ class APPUnlockNeedMobileNetworkingLockPage extends StatefulWidget {
|
||||
const APPUnlockNeedMobileNetworkingLockPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<APPUnlockNeedMobileNetworkingLockPage> createState() => _APPUnlockNeedMobileNetworkingLockPageState();
|
||||
State<APPUnlockNeedMobileNetworkingLockPage> createState() =>
|
||||
_APPUnlockNeedMobileNetworkingLockPageState();
|
||||
}
|
||||
|
||||
class _APPUnlockNeedMobileNetworkingLockPageState extends State<APPUnlockNeedMobileNetworkingLockPage> {
|
||||
class _APPUnlockNeedMobileNetworkingLockPageState
|
||||
extends State<APPUnlockNeedMobileNetworkingLockPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Column(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader
|
||||
.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr,
|
||||
haveBack: true,
|
||||
actionsList: [
|
||||
IconButton(
|
||||
onPressed: () {},
|
||||
icon: Image.asset(
|
||||
"images/icon_bar_search.png",
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
))
|
||||
],
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLockTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!
|
||||
.appUnlockRequiresMobilePhoneAccessToTheLockTip!.tr,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
CommonItem(leftTitel:TranslationLoader.lanKeys!.checkAll!.tr, rightTitle:"", allHeight:100.h, isHaveLine: false, isHaveRightWidget: true,
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.checkAll!.tr,
|
||||
rightTitle: "",
|
||||
allHeight: 70.h,
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Row(children: [Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),],),)
|
||||
),
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 26.w,
|
||||
height: 26.w,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 15.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _gatewatListItem('images/mine/icon_mine_gatewayListMainIcon.png', "星锁网关", "在线", "2", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _gatewatListItem(
|
||||
'images/mine/icon_mine_gatewayListMainIcon.png',
|
||||
"星锁网关",
|
||||
"在线",
|
||||
"2", () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||
});
|
||||
}
|
||||
),
|
||||
),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.h, bottom: 30.h),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
}),
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}),
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget _gatewatListItem(String lockTypeIcon, String gateWayName, String isOnline, String lockNumber, Function() action){
|
||||
Widget _gatewatListItem(String lockTypeIcon, String gateWayName,
|
||||
String isOnline, String lockNumber, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 80.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 15.w,),
|
||||
Image.asset('images/icon_round_unSelet.png', width: 40.w, height: 40.w,),
|
||||
SizedBox(width: 10.w,),
|
||||
Text("MCBN01_8f3106", style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w600),)
|
||||
SizedBox(
|
||||
width: 15.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_round_unSelet.png',
|
||||
width: 30.w,
|
||||
height: 30.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Text(
|
||||
"MCBN01_8f3106",
|
||||
style: TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,366 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get_utils/get_utils.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class AddAuthorizedAdministratorPage extends StatefulWidget {
|
||||
const AddAuthorizedAdministratorPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return _AddAuthorizedAdministratorPageState();
|
||||
}
|
||||
}
|
||||
|
||||
class _AddAuthorizedAdministratorPageState
|
||||
extends State<AddAuthorizedAdministratorPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController? _tabController;
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
late Contact _contact;
|
||||
final _templateNameTf = TextEditingController();
|
||||
|
||||
List tabs = [
|
||||
TranslationLoader.lanKeys!.permanent!.tr,
|
||||
TranslationLoader.lanKeys!.timeLimit!.tr
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTabController(
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColors.mainColor,
|
||||
title: Text(
|
||||
TranslationLoader.lanKeys!.addAuthorizedAdmin!.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 28.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
bottom: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(45),
|
||||
child: Material(
|
||||
color: Colors.white,
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
///点击的背景高亮颜色,处理阴影
|
||||
highlightColor: Colors.transparent,
|
||||
|
||||
///点击水波纹颜色
|
||||
splashColor: Colors.transparent,
|
||||
),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
indicatorColor: AppColors.mainColor,
|
||||
unselectedLabelColor: AppColors.blackColor,
|
||||
labelColor: AppColors.mainColor,
|
||||
// isScrollable: true,
|
||||
tabs: tabs.map((e) => Tab(text: e)).toList()),
|
||||
)),
|
||||
),
|
||||
),
|
||||
body: TabBarView(controller: _tabController, children: [
|
||||
_permanentAdministrator(),
|
||||
_timeLimitAdministrator()
|
||||
])));
|
||||
}
|
||||
|
||||
//永久
|
||||
Widget _permanentAdministrator() {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildAccoutRow(),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.pleaseSelet!.tr,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
remoteUnlockingWidget(),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
_buildSureBtn()
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
//限时管理员
|
||||
Widget _timeLimitAdministrator() {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
_buildAccoutRow(),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
keyTimeWidget(),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
rightTitle: TranslationLoader.lanKeys!.pleaseSelet!.tr,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
remoteUnlockingWidget(),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
_buildSureBtn()
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAccoutRow() {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
color: Colors.white,
|
||||
height: 60.h,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 40.w,
|
||||
),
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.accountNumber!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
||||
),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
textAlign: TextAlign.right,
|
||||
keyboardType: TextInputType.text,
|
||||
onChanged: (value) {},
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText:
|
||||
TranslationLoader.lanKeys!.pleaseEnterAccountNumber!.tr,
|
||||
hintStyle: TextStyle(
|
||||
color: AppColors.placeholderTextColor,
|
||||
fontSize: ScreenUtil().setSp(24),
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Image.asset(
|
||||
'images/icon_addressBook.png',
|
||||
width: 28.w,
|
||||
height: 28.h,
|
||||
),
|
||||
SizedBox(
|
||||
width: 40.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 1,
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 40.w,
|
||||
),
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
||||
),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
textAlign: TextAlign.right,
|
||||
keyboardType: TextInputType.text,
|
||||
onChanged: (value) {},
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(
|
||||
color: AppColors.placeholderTextColor,
|
||||
fontSize: ScreenUtil().setSp(24),
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
width: 40.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget getTFWidget(TextEditingController tfController, String tfStr) {
|
||||
return Container(
|
||||
height: 50.h,
|
||||
width: 500.w,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
controller: tfController,
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
hintText: tfStr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 远程开锁
|
||||
Widget remoteUnlockingWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
rightTitle: "",
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: Container(width: 80.w, height: 50.h, child: _switch()),
|
||||
action: () {}),
|
||||
Container(height: 40.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
rightTitle: "2020.06.20 11:49",
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
// _showDatePicker();
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget keyBottomWidget(String tipStr) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
tipStr,
|
||||
textAlign: TextAlign.start,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sender!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
// color: Colors.red,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.volumeAuthorizationLockManagePage);
|
||||
},
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontWeight: FontWeight.w500),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
CupertinoSwitch _switch() {
|
||||
bool _isOn = false;
|
||||
return CupertinoSwitch(
|
||||
activeColor: CupertinoColors.activeBlue,
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: _isOn,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isOn = value;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSureBtn() {
|
||||
return SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
onClick: () {},
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,8 @@ class _AuthorizedAdministratorListPageState
|
||||
icon: Image.asset('images/icon_add_white.png'),
|
||||
onPressed: () {
|
||||
// 处理操作按钮的点击事件
|
||||
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
|
||||
Navigator.pushNamed(
|
||||
context, Routers.addAuthorizedAdministratorPage);
|
||||
},
|
||||
),
|
||||
],
|
||||
@ -47,7 +48,7 @@ class _AuthorizedAdministratorListPageState
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -55,17 +56,19 @@ class _AuthorizedAdministratorListPageState
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
@ -81,7 +84,7 @@ class _AuthorizedAdministratorListPageState
|
||||
return ListView.builder(
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||
return _electronicKeyItem('images/controls_user.png', "张三",
|
||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
||||
});
|
||||
@ -93,7 +96,7 @@ class _AuthorizedAdministratorListPageState
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
height: 90.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@ -106,8 +109,8 @@ class _AuthorizedAdministratorListPageState
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
width: 44.w,
|
||||
height: 44.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
@ -122,7 +125,7 @@ class _AuthorizedAdministratorListPageState
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -134,7 +137,8 @@ class _AuthorizedAdministratorListPageState
|
||||
Text(
|
||||
"2023.6.21 11.15 永久",
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
fontSize: 20.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,45 +11,63 @@ class HideInvalidUnlockPermissionsPage extends StatefulWidget {
|
||||
const HideInvalidUnlockPermissionsPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<HideInvalidUnlockPermissionsPage> createState() => _HideInvalidUnlockPermissionsPageState();
|
||||
State<HideInvalidUnlockPermissionsPage> createState() =>
|
||||
_HideInvalidUnlockPermissionsPageState();
|
||||
}
|
||||
|
||||
class _HideInvalidUnlockPermissionsPageState extends State<HideInvalidUnlockPermissionsPage> {
|
||||
class _HideInvalidUnlockPermissionsPageState
|
||||
extends State<HideInvalidUnlockPermissionsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
TranslationLoader.lanKeys!.hideInvalidUnlockPermissions!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.hideInvalidUnlockPermissionsTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader
|
||||
.lanKeys!.hideInvalidUnlockPermissionsTip!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 22.sp),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}",
|
||||
style:
|
||||
TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.tr,
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.closed!.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: () {
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.basicInformation!.tr,
|
||||
barTitle: TranslationLoader.lanKeys!.lockGroup!.tr,
|
||||
haveBack: true,
|
||||
actionsList: [
|
||||
IconButton(
|
||||
@ -47,13 +47,20 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||
itemBuilder: (c, index) {
|
||||
if (index == 1) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
height: 40.h,
|
||||
child: const Text(
|
||||
'锁数量:1',
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 14),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
child: const Text(
|
||||
'锁数量:1',
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor, fontSize: 14),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -20,14 +20,32 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.basicInformation!.tr,
|
||||
barTitle: TranslationLoader.lanKeys!.lock!.tr,
|
||||
haveBack: true,
|
||||
actionsList: [
|
||||
IconButton(
|
||||
icon: Image.asset(
|
||||
'images/icon_bar_more.png',
|
||||
height: 30.h,
|
||||
width: 10.w,
|
||||
),
|
||||
onPressed: () {
|
||||
// 处理操作按钮的点击事件-添加锁分组
|
||||
},
|
||||
),
|
||||
],
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView.builder(
|
||||
body: ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return _listItemView();
|
||||
},
|
||||
itemCount: 2,
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return Divider(
|
||||
height: 1.h,
|
||||
color: AppColors.greyLineColor,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -51,7 +69,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
SizedBox(
|
||||
width: 8.w,
|
||||
width: 10.w,
|
||||
),
|
||||
const Text(
|
||||
'Daisy',
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -20,37 +19,47 @@ class _LockScreenPageState extends State<LockScreenPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.lockScreen!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.lockScreen!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.lockSoundTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.lockSoundTip!.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}", style: TextStyle(fontWeight: FontWeight.w600),)),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${TranslationLoader.lanKeys!.opened!.tr}",
|
||||
style:
|
||||
TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.closed!.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: () {
|
||||
|
||||
}
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.closed!.tr,
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ class _LockUserManageListListPageState
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.aboutToExpire!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
@ -38,6 +38,9 @@ class _LockUserManageListListPageState
|
||||
body: Column(
|
||||
children: [
|
||||
_searchWidget(),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SizedBox(
|
||||
width: ScreenUtil().screenWidth - 40.w,
|
||||
@ -46,12 +49,15 @@ class _LockUserManageListListPageState
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.massSendElectronicKeyManagePage);
|
||||
},
|
||||
child: Text(
|
||||
'群发钥匙',
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 28.sp,
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)),
|
||||
),
|
||||
@ -79,12 +85,13 @@ class _LockUserManageListListPageState
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
@ -100,7 +107,7 @@ class _LockUserManageListListPageState
|
||||
return ListView.builder(
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||
return _electronicKeyItem('images/controls_user.png', "张三",
|
||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
||||
});
|
||||
@ -112,12 +119,13 @@ class _LockUserManageListListPageState
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
height: 90.h,
|
||||
margin: EdgeInsets.only(top: 1.h),
|
||||
color: Colors.white,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(10.w),
|
||||
// ),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
@ -125,8 +133,8 @@ class _LockUserManageListListPageState
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
width: 44.w,
|
||||
height: 44.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
@ -140,29 +148,32 @@ class _LockUserManageListListPageState
|
||||
children: [
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(
|
||||
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5.h),
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"2023.6.21 11.15 永久",
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"2023.6.21 11.15 永久",
|
||||
style: TextStyle(
|
||||
fontSize: 20.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(width: 20.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 20.h),
|
||||
Image.asset(
|
||||
'images/icon_right_grey.png',
|
||||
width: 12.w,
|
||||
height: 21.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -39,21 +39,21 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
width: 80.w, height: 50.h, child: _switch())),
|
||||
width: 10.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())),
|
||||
width: 10.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())),
|
||||
width: 10.w, height: 50.h, child: _switch())),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
@ -146,7 +146,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
//
|
||||
// }),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
height: 50.h,
|
||||
),
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.about!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
@ -167,45 +167,44 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
// CommonItem(leftTitel:TranslationLoader.lanKeys!.thirdPartyInformationSharingList!.tr, rightTitle:"", isHaveLine: true, isHaveDirection: true, action: (){
|
||||
//
|
||||
// }),
|
||||
keyBottomWidget()
|
||||
],
|
||||
),
|
||||
),
|
||||
// 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,)
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
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(
|
||||
|
||||
@ -28,15 +28,12 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
onPressed: () {},
|
||||
child: Text(
|
||||
'全选',
|
||||
style: TextStyle(color: Colors.white, fontSize: 28.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
))
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
@ -74,7 +71,7 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
height: 70.h,
|
||||
height: 80.h,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -94,8 +91,8 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
),
|
||||
Image.asset(
|
||||
'images/getewayType_G2.png',
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
SizedBox(
|
||||
@ -103,7 +100,7 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
),
|
||||
Text(
|
||||
'星锁网关',
|
||||
style: TextStyle(fontSize: 28.sp),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -115,7 +112,7 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
Widget _buildNextBtn() {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
color: Colors.grey,
|
||||
color: AppColors.btnDisableColor,
|
||||
width: ScreenUtil().screenWidth,
|
||||
height: 64.h,
|
||||
child: TextButton(
|
||||
@ -124,7 +121,7 @@ class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||
},
|
||||
child: Text(
|
||||
'下一步',
|
||||
style: TextStyle(fontSize: 28.sp, color: Colors.white),
|
||||
style: TextStyle(fontSize: 24.sp, color: Colors.white),
|
||||
)),
|
||||
),
|
||||
);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
@ -85,8 +86,8 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
GestureDetector(
|
||||
child: Image.asset(
|
||||
leftIcon,
|
||||
width: 16,
|
||||
height: 16,
|
||||
width: 20.w,
|
||||
height: 20.w,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
@ -94,7 +95,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
),
|
||||
Text(
|
||||
leftTitle,
|
||||
style: TextStyle(fontSize: 28.sp),
|
||||
style: TextStyle(fontSize: 24.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -115,7 +116,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
Text(
|
||||
'账号',
|
||||
style:
|
||||
TextStyle(color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
||||
TextStyle(color: AppColors.darkGrayTextColor, fontSize: 22.sp),
|
||||
),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
@ -127,7 +128,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
hintText: '请输入手机号或email',
|
||||
hintStyle: TextStyle(
|
||||
color: AppColors.placeholderTextColor,
|
||||
fontSize: ScreenUtil().setSp(24),
|
||||
fontSize: ScreenUtil().setSp(22),
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
)),
|
||||
@ -153,28 +154,14 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
child: Text(
|
||||
'选中的智能锁将会转移到您输入的账号中,您将失去锁的管理权',
|
||||
style:
|
||||
TextStyle(fontSize: 20.sp, color: AppColors.placeholderTextColor),
|
||||
TextStyle(fontSize: 18.sp, color: AppColors.placeholderTextColor),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNextBtn() {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
color: Colors.grey,
|
||||
width: ScreenUtil().screenWidth - 80.w,
|
||||
height: 64.h,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, Routers.selectBranchPage);
|
||||
},
|
||||
child: Text(
|
||||
'下一步',
|
||||
style: TextStyle(fontSize: 28.sp, color: Colors.white),
|
||||
)),
|
||||
),
|
||||
);
|
||||
return SubmitBtn(btnName: '下一步', onClick: () {});
|
||||
}
|
||||
|
||||
Widget _buildRemoveBadLockBtn() {
|
||||
@ -186,7 +173,7 @@ class _RecipientInformationPageState extends State<RecipientInformationPage> {
|
||||
child: Text(
|
||||
'移除坏锁',
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, color: AppColors.darkGrayTextColor),
|
||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||
textAlign: TextAlign.end,
|
||||
)),
|
||||
SizedBox(
|
||||
|
||||
@ -2,7 +2,6 @@ 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/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
@ -28,7 +28,7 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
onPressed: () {},
|
||||
child: Text(
|
||||
'全选',
|
||||
style: TextStyle(color: Colors.white, fontSize: 28.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
))
|
||||
],
|
||||
),
|
||||
@ -54,7 +54,7 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
@ -62,17 +62,19 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||
top: 20.h, bottom: 20.h, right: 20.w, left: 10.w),
|
||||
child: Image.asset(
|
||||
'images/main/icon_main_search.png',
|
||||
width: 40.w,
|
||||
@ -108,7 +110,7 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
return GestureDetector(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
height: 70.h,
|
||||
height: 90.h,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -133,11 +135,11 @@ class _TransferSmartLockPageState extends State<TransferSmartLockPage> {
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
SizedBox(
|
||||
width: 8.w,
|
||||
width: 10.w,
|
||||
),
|
||||
const Text(
|
||||
Text(
|
||||
'Daisy',
|
||||
style: TextStyle(fontSize: 14),
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -18,7 +17,8 @@ class StarLockMinePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
GlobalKey<_StarLockMinePageState> starLockMineKey = GlobalKey();
|
||||
class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
|
||||
class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -28,73 +28,112 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
children: [
|
||||
topWidget(),
|
||||
bottomListWidget(),
|
||||
SizedBox(height: 40.h,),
|
||||
keyBottomWidget()
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
),
|
||||
// keyBottomWidget()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget topWidget(){
|
||||
Widget topWidget() {
|
||||
return Container(
|
||||
height: 450.h,
|
||||
height: 380.h,
|
||||
width: 1.sw,
|
||||
color: AppColors.mainColor,
|
||||
// color: Colors.red,
|
||||
child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
child: Stack(
|
||||
children: [
|
||||
SizedBox(height: 120.h,),
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.starLockLoginPage);
|
||||
},
|
||||
child: Container(
|
||||
width: 150.w, height: 150.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 2, color: Colors.white),
|
||||
borderRadius: BorderRadius.circular(75.h),
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_topBg.png',
|
||||
width: 400.w,
|
||||
height: 380.h,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Center(
|
||||
child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 120.h,
|
||||
),
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Image.asset('images/mine/icon_mine_main_defaultAvatar.png', width: 100.w, height: 100.w)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Navigator.pushNamed(context, Routers.starLockLoginPage);
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 108.w,
|
||||
height: 105.w,
|
||||
child: Image.asset(
|
||||
'images/mine/icon_mine_main_defaultAvatar.png',
|
||||
width: 60.w,
|
||||
height: 60.w)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
Text("15080825640",
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: Colors.white,
|
||||
)),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Text(
|
||||
"${TranslationLoader.lanKeys!.accountNumber!.tr}:15080825640",
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
Text("15080825640", style: TextStyle(fontSize: 30.sp, color: Colors.white, fontWeight: FontWeight.w500)),
|
||||
SizedBox(height: 10.h,),
|
||||
Text("${TranslationLoader.lanKeys!.accountNumber!.tr}:15080825640", style: TextStyle(fontSize: 22.sp, color: Colors.white, fontWeight: FontWeight.w500)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottomListWidget(){
|
||||
Widget bottomListWidget() {
|
||||
return Expanded(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.only(left: 70.w, top: 50.h, right: 10.w),
|
||||
padding: EdgeInsets.only(
|
||||
left: 60.w,
|
||||
top: 50.h,
|
||||
),
|
||||
children: <Widget>[
|
||||
mineItem('images/mine/icon_mine_main_personInfo.png', TranslationLoader.lanKeys!.personalInformation!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_addLock.png', TranslationLoader.lanKeys!.addLock!.tr, (){
|
||||
// mineItem('images/mine/icon_mine_main_personInfo.png',
|
||||
// TranslationLoader.lanKeys!.personalInformation!.tr, () {
|
||||
// Navigator.pushNamed(context, Routers.minePersonInfoPage);
|
||||
// }),
|
||||
mineItem('images/mine/icon_mine_main_addLock.png',
|
||||
TranslationLoader.lanKeys!.addDevice!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.seletLockTypePage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_gateway.png', TranslationLoader.lanKeys!.gateway!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_message.png', TranslationLoader.lanKeys!.message!.tr, (){
|
||||
// mineItem('images/mine/icon_mine_main_gateway.png',
|
||||
// TranslationLoader.lanKeys!.gateway!.tr, () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||
// }),
|
||||
mineItem('images/mine/icon_mine_main_message.png',
|
||||
TranslationLoader.lanKeys!.message!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.messageListPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_supportStaff.png', TranslationLoader.lanKeys!.supportStaff!.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_supportStaff.png',
|
||||
TranslationLoader.lanKeys!.supportStaff!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.supportStaffPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_set.png',
|
||||
TranslationLoader.lanKeys!.set!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.mineSetPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_vip.png', TranslationLoader.lanKeys!.valueAddedServices!.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_vip.png',
|
||||
TranslationLoader.lanKeys!.valueAddedServices!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.valueAddedServicesPage);
|
||||
}),
|
||||
mineItem('images/mine/icon_mine_main_about.png', TranslationLoader.lanKeys!.about!.tr, (){
|
||||
mineItem('images/mine/icon_mine_main_about.png',
|
||||
TranslationLoader.lanKeys!.about!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.abountPage);
|
||||
}),
|
||||
],
|
||||
@ -105,15 +144,13 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.logout!.tr,
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.logout!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 60.w, right: 60.w),
|
||||
padding: EdgeInsets.only(top: 15.w, bottom: 15.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
Container(
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
// color: Colors.red,
|
||||
@ -121,20 +158,25 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.deleteAccount!.tr, style: TextStyle(color: AppColors.mainColor, fontWeight: FontWeight.w500),),
|
||||
onPressed: () {
|
||||
|
||||
},
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.deleteAccount!.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontWeight: FontWeight.w500),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.h,)
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget mineItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
||||
Widget mineItem(
|
||||
String lockTypeIcon, String lockTypeTitle, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Row(
|
||||
@ -142,31 +184,35 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget{
|
||||
Center(
|
||||
child: Container(
|
||||
// height: 80.h,
|
||||
width: 400.w,
|
||||
width: 330.w,
|
||||
padding: EdgeInsets.all(20.h),
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Image.asset(lockTypeIcon, width: 40.w, height: 40.w,),
|
||||
SizedBox(width:15.w),
|
||||
Expanded(child: Text(lockTypeTitle, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), )),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 28.w,
|
||||
height: 28.w,
|
||||
),
|
||||
SizedBox(width: 15.w),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(height: 0.5.h, color: Colors.grey,)
|
||||
Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void onShow(){
|
||||
void onShow() {}
|
||||
|
||||
}
|
||||
|
||||
void onHide(){
|
||||
|
||||
}
|
||||
void onHide() {}
|
||||
}
|
||||
|
||||
|
||||
@ -40,9 +40,7 @@ class CommonItem extends StatelessWidget {
|
||||
children: [
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Text(leftTitel!,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500))),
|
||||
child: Text(leftTitel!, style: TextStyle(fontSize: 22.sp))),
|
||||
SizedBox(width: 20.w),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
@ -53,19 +51,20 @@ class CommonItem extends StatelessWidget {
|
||||
rightTitle!,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.darkGrayTextColor),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(width: 5.w),
|
||||
SizedBox(width: 8.w),
|
||||
isHaveDirection!
|
||||
? Image.asset(
|
||||
'images/icon_right.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
'images/icon_right_grey.png',
|
||||
width: 12.w,
|
||||
height: 21.w,
|
||||
)
|
||||
: SizedBox(width: 10.w),
|
||||
// SizedBox(width:10.w),
|
||||
: SizedBox(width: 20.w),
|
||||
SizedBox(width: 20.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
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';
|
||||
|
||||
@ -27,6 +28,8 @@ class SubmitBtn extends StatelessWidget {
|
||||
|
||||
double? borderRadius;
|
||||
|
||||
bool? isDelete;
|
||||
|
||||
SubmitBtn(
|
||||
{Key? key,
|
||||
required this.btnName,
|
||||
@ -37,6 +40,7 @@ class SubmitBtn extends StatelessWidget {
|
||||
this.margin,
|
||||
this.width,
|
||||
this.backgroundColorList,
|
||||
this.isDelete,
|
||||
this.fontSize})
|
||||
: super(key: key);
|
||||
|
||||
@ -44,10 +48,11 @@ class SubmitBtn extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: ScreenUtil().screenWidth - 40.w,
|
||||
height: 44,
|
||||
height: 60.h,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.mainColor,
|
||||
backgroundColor:
|
||||
isDelete == true ? Colors.red : AppColors.mainColor,
|
||||
),
|
||||
onPressed: () {
|
||||
if (onClick != null) {
|
||||
@ -56,7 +61,7 @@ class SubmitBtn extends StatelessWidget {
|
||||
},
|
||||
child: Text(
|
||||
btnName!,
|
||||
style: TextStyle(color: Colors.white, fontSize: 30.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
)),
|
||||
);
|
||||
/*
|
||||
|
||||
@ -8,7 +8,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
* */
|
||||
|
||||
class LoginInput extends StatelessWidget {
|
||||
|
||||
TextEditingController? controller;
|
||||
List<TextInputFormatter>? inputFormatters;
|
||||
TextInputType? keyboardType;
|
||||
@ -19,7 +18,19 @@ class LoginInput extends StatelessWidget {
|
||||
String? label;
|
||||
bool? isPwd;
|
||||
Widget? rightSlot;
|
||||
LoginInput({Key? key, required this.controller,this.rightSlot,this.label,this.isPwd,this.inputFormatters,this.keyboardType,this.background,this.hintText, this.isHaveLeftWidget = true, this.leftWidget}) : super(key: key);
|
||||
LoginInput(
|
||||
{Key? key,
|
||||
required this.controller,
|
||||
this.rightSlot,
|
||||
this.label,
|
||||
this.isPwd,
|
||||
this.inputFormatters,
|
||||
this.keyboardType,
|
||||
this.background,
|
||||
this.hintText,
|
||||
this.isHaveLeftWidget = true,
|
||||
this.leftWidget})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -36,17 +47,28 @@ class LoginInput extends StatelessWidget {
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(top: 8.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 8.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
labelText: label,
|
||||
labelStyle: TextStyle(fontSize: 22.sp),
|
||||
hintStyle: TextStyle(fontSize: 22.sp),
|
||||
hintText: hintText,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: isHaveLeftWidget == true?leftWidget:SizedBox(width: 20.w, height: 40.w,),
|
||||
icon: isHaveLeftWidget == true
|
||||
? leftWidget
|
||||
: SizedBox(
|
||||
width: 20.w,
|
||||
height: 40.w,
|
||||
),
|
||||
),
|
||||
obscureText: isPwd??false,
|
||||
obscureText: isPwd ?? false,
|
||||
),
|
||||
Container(
|
||||
height: 0.5.h,
|
||||
color: Colors.grey,
|
||||
),
|
||||
Container(height: 0.5.h, color: Colors.grey,),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class TitleAppBar extends AppBar {
|
||||
|
||||
@override
|
||||
final Color? backgroundColor;
|
||||
final String? barTitle;
|
||||
@ -15,26 +14,47 @@ class TitleAppBar extends AppBar {
|
||||
final Widget? leftWidget;
|
||||
List<Widget>? actionsList;
|
||||
|
||||
TitleAppBar({Key? key,this.barTitle,this.titleColor, this.haveTitleWidget = false, this.titleWidget, this.iconColor,this.backgroundColor,this.actionsList, this.haveBack, this.haveOtherLeftWidget = false , this.leftWidget}) : super(key: key);
|
||||
TitleAppBar(
|
||||
{Key? key,
|
||||
this.barTitle,
|
||||
this.titleColor,
|
||||
this.haveTitleWidget = false,
|
||||
this.titleWidget,
|
||||
this.iconColor,
|
||||
this.backgroundColor,
|
||||
this.actionsList,
|
||||
this.haveBack,
|
||||
this.haveOtherLeftWidget = false,
|
||||
this.leftWidget})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_TitleAppBarState createState() => _TitleAppBarState();
|
||||
|
||||
}
|
||||
|
||||
class _TitleAppBarState extends State<TitleAppBar> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
elevation: 0,
|
||||
leading:widget.haveOtherLeftWidget!?widget.leftWidget:(widget.haveBack!?IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios,color: widget.iconColor??Colors.white),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
):Container()),
|
||||
backgroundColor: widget.backgroundColor??Colors.white,
|
||||
title: widget.haveTitleWidget!?widget.titleWidget:Text(widget.barTitle??'', style: TextStyle(color: widget.titleColor??Colors.white,fontSize: 36.sp, fontWeight:FontWeight.w500)),
|
||||
centerTitle: true,
|
||||
actions: widget.actionsList??[]
|
||||
);
|
||||
elevation: 0,
|
||||
leading: widget.haveOtherLeftWidget!
|
||||
? widget.leftWidget
|
||||
: (widget.haveBack!
|
||||
? IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios,
|
||||
color: widget.iconColor ?? Colors.white),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
)
|
||||
: Container()),
|
||||
backgroundColor: widget.backgroundColor ?? Colors.white,
|
||||
title: widget.haveTitleWidget!
|
||||
? widget.titleWidget
|
||||
: Text(widget.barTitle ?? '',
|
||||
style: TextStyle(
|
||||
color: widget.titleColor ?? Colors.white,
|
||||
fontSize: 28.sp,
|
||||
fontWeight: FontWeight.w600)),
|
||||
centerTitle: true,
|
||||
actions: widget.actionsList ?? []);
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,6 +185,7 @@ class LanKeyEntity {
|
||||
this.lanChinese,
|
||||
this.multilingual,
|
||||
this.addLock,
|
||||
this.addDevice,
|
||||
this.gateway,
|
||||
this.message,
|
||||
this.supportStaff,
|
||||
@ -196,6 +197,7 @@ class LanKeyEntity {
|
||||
this.pushNotification,
|
||||
this.lockUserManagement,
|
||||
this.authorizedAdmin,
|
||||
this.addAuthorizedAdmin,
|
||||
this.lockGroup,
|
||||
this.transferSmartLock,
|
||||
this.selectiveLock,
|
||||
@ -225,7 +227,9 @@ class LanKeyEntity {
|
||||
this.safetyProblem,
|
||||
this.modifyAccountTip,
|
||||
this.pleaseEnterAccountNumber,
|
||||
this.pleaseEnterNewAccountNumber,
|
||||
this.changeIphoneTip,
|
||||
this.changeEmailTip,
|
||||
this.originalPassword,
|
||||
this.newPassword,
|
||||
this.surePassword,
|
||||
@ -270,6 +274,7 @@ class LanKeyEntity {
|
||||
this.padlock,
|
||||
this.safeLock,
|
||||
this.intelligentLockCore,
|
||||
this.itelligentAccessControl,
|
||||
this.parkingLock,
|
||||
this.bicycleLock,
|
||||
this.longRangeControl,
|
||||
@ -552,6 +557,7 @@ class LanKeyEntity {
|
||||
lanChinese = json['lanChinese'];
|
||||
multilingual = json['multilingual'];
|
||||
addLock = json['addLock'];
|
||||
addDevice = json['addDevice'];
|
||||
gateway = json['gateway'];
|
||||
message = json['message'];
|
||||
supportStaff = json['supportStaff'];
|
||||
@ -564,6 +570,7 @@ class LanKeyEntity {
|
||||
pushNotification = json['pushNotification'];
|
||||
lockUserManagement = json['lockUserManagement'];
|
||||
authorizedAdmin = json['authorizedAdmin'];
|
||||
addAuthorizedAdmin = json['addAuthorizedAdmin'];
|
||||
lockGroup = json['lockGroup'];
|
||||
transferSmartLock = json['transferSmartLock'];
|
||||
selectiveLock = json['selectiveLock'];
|
||||
@ -596,7 +603,9 @@ class LanKeyEntity {
|
||||
safetyProblem = json['safetyProblem'];
|
||||
modifyAccountTip = json['modifyAccountTip'];
|
||||
pleaseEnterAccountNumber = json['pleaseEnterAccountNumber'];
|
||||
pleaseEnterNewAccountNumber = json['pleaseEnterNewAccountNumber'];
|
||||
changeIphoneTip = json['changeIphoneTip'];
|
||||
changeEmailTip = json['changeEmailTip'];
|
||||
originalPassword = json['originalPassword'];
|
||||
newPassword = json['newPassword'];
|
||||
surePassword = json['surePassword'];
|
||||
@ -646,6 +655,7 @@ class LanKeyEntity {
|
||||
padlock = json['padlock'];
|
||||
safeLock = json['safeLock'];
|
||||
intelligentLockCore = json['intelligentLockCore'];
|
||||
itelligentAccessControl = json['itelligentAccessControl'];
|
||||
parkingLock = json['parkingLock'];
|
||||
bicycleLock = json['bicycleLock'];
|
||||
longRangeControl = json['longRangeControl'];
|
||||
@ -936,6 +946,7 @@ class LanKeyEntity {
|
||||
String? lanChinese;
|
||||
String? multilingual;
|
||||
String? addLock;
|
||||
String? addDevice;
|
||||
String? gateway;
|
||||
String? message;
|
||||
String? supportStaff;
|
||||
@ -948,6 +959,7 @@ class LanKeyEntity {
|
||||
String? pushNotification;
|
||||
String? lockUserManagement;
|
||||
String? authorizedAdmin;
|
||||
String? addAuthorizedAdmin;
|
||||
String? lockGroup;
|
||||
String? transferSmartLock;
|
||||
String? selectiveLock;
|
||||
@ -978,7 +990,9 @@ class LanKeyEntity {
|
||||
String? safetyProblem;
|
||||
String? modifyAccountTip;
|
||||
String? pleaseEnterAccountNumber;
|
||||
String? pleaseEnterNewAccountNumber;
|
||||
String? changeIphoneTip;
|
||||
String? changeEmailTip;
|
||||
String? originalPassword;
|
||||
String? newPassword;
|
||||
String? surePassword;
|
||||
@ -1025,6 +1039,7 @@ class LanKeyEntity {
|
||||
String? padlock;
|
||||
String? safeLock;
|
||||
String? intelligentLockCore;
|
||||
String? itelligentAccessControl;
|
||||
String? parkingLock;
|
||||
String? bicycleLock;
|
||||
String? longRangeControl;
|
||||
@ -1316,6 +1331,7 @@ class LanKeyEntity {
|
||||
map['lanChinese'] = lanChinese;
|
||||
map['multilingual'] = multilingual;
|
||||
map['addLock'] = addLock;
|
||||
map['addDevice'] = addDevice;
|
||||
map['gateway'] = gateway;
|
||||
map['message'] = message;
|
||||
map['supportStaff'] = supportStaff;
|
||||
@ -1328,6 +1344,7 @@ class LanKeyEntity {
|
||||
map['pushNotification'] = pushNotification;
|
||||
map['lockUserManagement'] = lockUserManagement;
|
||||
map['authorizedAdmin'] = authorizedAdmin;
|
||||
map['addAuthorizedAdmin'] = addAuthorizedAdmin;
|
||||
map['lockGroup'] = lockGroup;
|
||||
map['transferSmartLock'] = transferSmartLock;
|
||||
map['selectiveLock'] = selectiveLock;
|
||||
@ -1361,7 +1378,9 @@ class LanKeyEntity {
|
||||
map['safetyProblem'] = safetyProblem;
|
||||
map['modifyAccountTip'] = modifyAccountTip;
|
||||
map['pleaseEnterAccountNumber'] = pleaseEnterAccountNumber;
|
||||
map['pleaseEnterNewAccountNumber'] = pleaseEnterNewAccountNumber;
|
||||
map['changeIphoneTip'] = changeIphoneTip;
|
||||
map['changeEmailTip'] = changeEmailTip;
|
||||
map['originalPassword'] = originalPassword;
|
||||
map['newPassword'] = newPassword;
|
||||
map['surePassword'] = surePassword;
|
||||
@ -1409,6 +1428,7 @@ class LanKeyEntity {
|
||||
map['padlock'] = padlock;
|
||||
map['safeLock'] = safeLock;
|
||||
map['intelligentLockCore'] = intelligentLockCore;
|
||||
map['itelligentAccessControl'] = itelligentAccessControl;
|
||||
map['parkingLock'] = parkingLock;
|
||||
map['bicycleLock'] = bicycleLock;
|
||||
map['longRangeControl'] = longRangeControl;
|
||||
|
||||