1,更新部分UI
2,新增部分图片 3,新增选择网关页面
BIN
star_lock/images/controls_user.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
star_lock/images/getewayType_G2.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
star_lock/images/icon_btn_add.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
star_lock/images/icon_fingerprint.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
star_lock/images/icon_password.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"starLock":"星锁",
|
"starLock":"星锁",
|
||||||
"clickUnlockAndHoldDownClose":"点击开锁,长按关闭",
|
"clickUnlockAndHoldDownClose":"点击开锁,长按关闭",
|
||||||
"checkingIn":"考勤",
|
"checkingIn":"考勤",
|
||||||
"electronicKey":"电子钥匙",
|
"electronicKey":"电子钥匙",
|
||||||
"password":"密码",
|
"password":"密码",
|
||||||
|
|||||||
BIN
star_lock/images/lockType/addLock_touchScreen.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
star_lock/images/lockType/lockType_allLocks.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
star_lock/images/lockType/lockType_bicycleLock.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
star_lock/images/lockType/lockType_doorLock.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
star_lock/images/lockType/lockType_intelligentLockCore.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
star_lock/images/lockType/lockType_padlock.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
star_lock/images/lockType/lockType_parkingLock.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
star_lock/images/lockType/lockType_remoteControl.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
star_lock/images/lockType/lockType_safeLock.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_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/lockUserManage/lockUserManageList_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/mineSet_page.dart';
|
import 'package:star_lock/mine/mineSet/mineSet_page.dart';
|
||||||
|
import 'package:star_lock/mine/mineSet/transferGateway/selectGetewayList_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLock_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLock_page.dart';
|
||||||
@ -251,6 +252,7 @@ abstract class Routers {
|
|||||||
static const transferSmartLockPage = '/transferSmartLockPage'; //转移智能锁
|
static const transferSmartLockPage = '/transferSmartLockPage'; //转移智能锁
|
||||||
static const recipientInformationPage = '/recipientInformationPage'; //接受人信息
|
static const recipientInformationPage = '/recipientInformationPage'; //接受人信息
|
||||||
static const selectBranchPage = '/SelectBranchPage'; //选择分店
|
static const selectBranchPage = '/SelectBranchPage'; //选择分店
|
||||||
|
static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关
|
||||||
|
|
||||||
static const starLockLoginPage = '/StarLockLoginPage'; // 登录
|
static const starLockLoginPage = '/StarLockLoginPage'; // 登录
|
||||||
static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册
|
static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册
|
||||||
@ -670,6 +672,9 @@ abstract class AppRouters {
|
|||||||
name: Routers.recipientInformationPage,
|
name: Routers.recipientInformationPage,
|
||||||
page: () => const RecipientInformationPage()),
|
page: () => const RecipientInformationPage()),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.selectBranchPage, page: () => const SelectBranchPage())
|
name: Routers.selectBranchPage, page: () => const SelectBranchPage()),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.selectGetewayListPage,
|
||||||
|
page: () => const SelectGetewayListPage())
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -13,7 +12,8 @@ class AuthorizedAdminListPage extends StatefulWidget {
|
|||||||
const AuthorizedAdminListPage({Key? key}) : super(key: key);
|
const AuthorizedAdminListPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AuthorizedAdminListPage> createState() => _AuthorizedAdminListPageState();
|
State<AuthorizedAdminListPage> createState() =>
|
||||||
|
_AuthorizedAdminListPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||||
@ -21,13 +21,20 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
child: Text(
|
||||||
onPressed: (){
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
},),
|
),
|
||||||
],),
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
@ -35,12 +42,12 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||||
borderRadius: 20.w,
|
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),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
|
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -48,11 +55,10 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -67,8 +73,13 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -79,14 +90,15 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -98,9 +110,17 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 30.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -108,7 +128,11 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
SizedBox(height: 5.h),
|
||||||
@ -116,7 +140,11 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15 永久",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -20,13 +20,20 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electronicKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.electronicKey!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
child: Text(
|
||||||
onPressed: (){
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
},),
|
),
|
||||||
],),
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
@ -34,12 +41,13 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
||||||
borderRadius: 20.w,
|
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),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
|
Navigator.pushNamed(
|
||||||
}
|
context, Routers.sendElectronicKeyManagePage);
|
||||||
),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -47,11 +55,10 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -66,8 +73,13 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -78,14 +90,15 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -97,9 +110,17 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 30.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -109,9 +130,17 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"待接收",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -120,7 +149,11 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15-2023.6.21 11.15",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -12,7 +11,8 @@ class ImportOtherLockDataPage extends StatefulWidget {
|
|||||||
const ImportOtherLockDataPage({Key? key}) : super(key: key);
|
const ImportOtherLockDataPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ImportOtherLockDataPage> createState() => _ImportOtherLockDataPageState();
|
State<ImportOtherLockDataPage> createState() =>
|
||||||
|
_ImportOtherLockDataPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||||
@ -20,7 +20,10 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Container(
|
body: Container(
|
||||||
padding: EdgeInsets.all(30.w),
|
padding: EdgeInsets.all(30.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -28,35 +31,37 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Text(TranslationLoader.lanKeys!.importOtherLockDataTip!.tr)),
|
Expanded(
|
||||||
|
child: Text(TranslationLoader
|
||||||
|
.lanKeys!.importOtherLockDataTip!.tr)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 20.h,),
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
SizedBox(height: 10.h,),
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
Expanded(child: _buildMainUI()),
|
Expanded(child: _buildMainUI()),
|
||||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
SubmitBtn(
|
||||||
|
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
fontSize: 32.sp,
|
fontSize: 32.sp,
|
||||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () {
|
onClick: () {}),
|
||||||
|
|
||||||
}
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 70.h,
|
height: 60.h,
|
||||||
// margin: EdgeInsets.only(top:20.w),
|
// margin: EdgeInsets.only(top:20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -71,8 +76,13 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -83,14 +93,15 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 20,
|
itemCount: 20,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -102,9 +113,17 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 30.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -114,9 +133,17 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"待接收",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -125,7 +152,11 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15-2023.6.21 11.15",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -139,5 +170,4 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -20,12 +19,12 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.starLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [topWidget(), Expanded(child: bottomWidget())],
|
||||||
topWidget(),
|
|
||||||
Expanded(child: bottomWidget())
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -39,14 +38,25 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text("MCBN01-ea9240", style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),)
|
child: Text(
|
||||||
),
|
"MCBN01-ea9240",
|
||||||
|
style:
|
||||||
|
TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||||
|
)),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"100%",
|
||||||
|
style:
|
||||||
|
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
SizedBox(width: 5.w),
|
SizedBox(width: 5.w),
|
||||||
Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
|
Image.asset(
|
||||||
|
'images/main/icon_main_cell.png',
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
SizedBox(width: 30.w),
|
SizedBox(width: 30.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -58,23 +68,43 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
height: 280.w,
|
height: 280.w,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Center(child: Image.asset('images/main/icon_main_openLockBtn.png', width: 280.w, height: 280.w)),
|
Center(
|
||||||
|
child: Image.asset('images/main/icon_main_openLockBtn.png',
|
||||||
|
width: 280.w, height: 280.w)),
|
||||||
Align(
|
Align(
|
||||||
alignment: const Alignment(0.5, 1),
|
alignment: const Alignment(0.5, 1),
|
||||||
child: Image.asset('images/main/icon_main_remoteUnlocking.png', width: 90.w, height: 90.w,)
|
child: Image.asset(
|
||||||
),
|
'images/main/icon_main_remoteUnlocking.png',
|
||||||
|
width: 90.w,
|
||||||
|
height: 90.w,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 40.h,),
|
SizedBox(
|
||||||
|
height: 40.h,
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),),
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: const Color(0xFFB3B3B3),
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 40.h,),
|
SizedBox(
|
||||||
Container(height: 0.5.h, color: Colors.grey,)
|
height: 40.h,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: const Color(0xFFB3B3B3),
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -91,31 +121,43 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: [
|
children: [
|
||||||
bottomItem('images/main/icon_main_clockingIn.png', TranslationLoader.lanKeys!.checkingIn!.tr, (){
|
bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
|
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.checkingInListPage);
|
Navigator.pushNamed(context, Routers.checkingInListPage);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_electronicKey.png', TranslationLoader.lanKeys!.electronicKey!.tr, (){
|
bottomItem('images/main/icon_main_electronicKey.png',
|
||||||
|
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyListPage);
|
Navigator.pushNamed(context, Routers.electronicKeyListPage);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_password.png', TranslationLoader.lanKeys!.password!.tr, (){
|
bottomItem('images/main/icon_main_password.png',
|
||||||
|
TranslationLoader.lanKeys!.password!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyListPage);
|
Navigator.pushNamed(context, Routers.passwordKeyListPage);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, (){
|
bottomItem('images/main/icon_main_icCard.png',
|
||||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 0);
|
TranslationLoader.lanKeys!.card!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
|
arguments: 0);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, (){
|
bottomItem('images/main/icon_main_fingerprint.png',
|
||||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 1);
|
TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
|
arguments: 1);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, (){
|
bottomItem('images/main/icon_main_remoteControl.png',
|
||||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 2);
|
TranslationLoader.lanKeys!.remoteControl!.tr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||||
|
arguments: 2);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_authorizedAdmin.png', TranslationLoader.lanKeys!.authorizedAdmin!.tr, (){
|
bottomItem('images/main/icon_main_authorizedAdmin.png',
|
||||||
|
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.authorizedAdminListPage);
|
Navigator.pushNamed(context, Routers.authorizedAdminListPage);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png', TranslationLoader.lanKeys!.operatingRecord!.tr, (){
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
|
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.lockOperatingRecordPage);
|
Navigator.pushNamed(context, Routers.lockOperatingRecordPage);
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr, (){
|
bottomItem('images/main/icon_main_set.png',
|
||||||
|
TranslationLoader.lanKeys!.set!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.lockSetPage);
|
Navigator.pushNamed(context, Routers.lockSetPage);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -138,13 +180,17 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
child: Image.asset(iconUrl, width: width,height: height,fit: BoxFit.fitWidth),
|
child: Image.asset(iconUrl,
|
||||||
|
width: width, height: height, fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15.w),
|
SizedBox(height: 15.w),
|
||||||
Expanded(child: Text(name,style: TextStyle(fontSize: 25.sp, color:const Color(0xff333333)),textAlign: TextAlign.center))
|
Expanded(
|
||||||
|
child: Text(name,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25.sp, color: const Color(0xff333333)),
|
||||||
|
textAlign: TextAlign.center))
|
||||||
],
|
],
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -12,7 +11,8 @@ class LockOperatingRecordPage extends StatefulWidget {
|
|||||||
const LockOperatingRecordPage({Key? key}) : super(key: key);
|
const LockOperatingRecordPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState();
|
State<LockOperatingRecordPage> createState() =>
|
||||||
|
_LockOperatingRecordPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||||
@ -20,9 +20,16 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.operatingRecord!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
TextButton(
|
TextButton(
|
||||||
child: const Text("操作", style: TextStyle(color: Colors.white),),
|
child: const Text(
|
||||||
|
"操作",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
||||||
print('选中index: $index');
|
print('选中index: $index');
|
||||||
@ -35,14 +42,20 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
// _scan();
|
// _scan();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},),
|
},
|
||||||
],),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
padding: EdgeInsets.all(20.h),
|
padding: EdgeInsets.all(20.h),
|
||||||
child: Text(TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr, textAlign: TextAlign.start,),
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: TextStyle(fontSize: 24.sp),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
Expanded(child: _buildMainUI()),
|
Expanded(child: _buildMainUI()),
|
||||||
@ -56,8 +69,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
height: 60.h,
|
height: 60.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -73,8 +85,13 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -88,12 +105,12 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
if (index % 2 == 0) {
|
if (index % 2 == 0) {
|
||||||
return _dateItem("2023-06-29");
|
return _dateItem("2023-06-29");
|
||||||
} else {
|
} else {
|
||||||
return _operatingRecordItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _operatingRecordItem('images/controls_user.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _dateItem(String lockDate) {
|
Widget _dateItem(String lockDate) {
|
||||||
@ -103,17 +120,21 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
padding: EdgeInsets.only(left: 20.h, right: 20.h),
|
padding: EdgeInsets.only(left: 20.h, right: 20.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(lockDate, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockDate,
|
||||||
|
style: TextStyle(fontSize: 28.sp),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _operatingRecordItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 110.h,
|
height: 90.h,
|
||||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -121,16 +142,28 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 20.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, color: AppColors.blackColor),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
@ -138,7 +171,12 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15-2023.6.21 11.15", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15-2023.6.21 11.15",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp,
|
||||||
|
color: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -152,5 +190,4 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -17,32 +16,40 @@ class OtherTypeKeyListPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var type = ModalRoute.of(context)?.settings.arguments as int;
|
var type = ModalRoute.of(context)?.settings.arguments as int;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: getAppBarTitle(type),
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
child: Text(
|
||||||
onPressed: (){
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
},),
|
),
|
||||||
],),
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
Expanded(child: _buildMainUI(type)),
|
Expanded(child: _buildMainUI(type)),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
|
btnName:
|
||||||
|
'${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
|
||||||
borderRadius: 20.w,
|
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),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, arguments: type);
|
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
|
||||||
}
|
arguments: type);
|
||||||
),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -68,11 +75,10 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -87,8 +93,13 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -99,14 +110,16 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage, arguments: type);
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
|
Navigator.pushNamed(context, Routers.otherTypeKeyDetailPage,
|
||||||
|
arguments: type);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -118,9 +131,17 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 30.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -128,7 +149,11 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
SizedBox(height: 5.h),
|
||||||
@ -136,7 +161,11 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15 永久",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -20,13 +20,20 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.password!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.password!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
child: Text(
|
||||||
onPressed: (){
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
},),
|
),
|
||||||
],),
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
@ -34,12 +41,12 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||||
borderRadius: 20.w,
|
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),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
|
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -47,11 +54,10 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
borderRadius: BorderRadius.circular(5)),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
//输入框一行
|
//输入框一行
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -66,8 +72,13 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
//左边图标设置
|
//左边图标设置
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 20.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -78,14 +89,15 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyDetailPage);
|
Navigator.pushNamed(context, Routers.passwordKeyDetailPage);
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function()? action){
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function()? action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -97,9 +109,17 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
width: 30.w,
|
||||||
SizedBox(width: 30.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -107,7 +127,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
SizedBox(height: 5.h),
|
||||||
@ -115,7 +139,11 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text("2023.6.21 11.15 永久", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
"2023.6.21 11.15 永久",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -17,53 +17,65 @@ class AddLockPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: Colors.white,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 100.h,),
|
SizedBox(
|
||||||
|
height: 100.h,
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.lightTouchScreen!.tr, style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),),
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.lightTouchScreen!.tr,
|
||||||
|
style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 120.h,),
|
SizedBox(
|
||||||
Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w,),
|
height: 120.h,
|
||||||
SizedBox(height: 120.h,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/lockType/addLock_touchScreen.png',
|
||||||
|
width: 278.w,
|
||||||
|
height: 278.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 120.h,
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.lightTouchScreenTip!.tr, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),),
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.lightTouchScreenTip!.tr,
|
||||||
|
style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 120.h,),
|
SizedBox(
|
||||||
|
height: 120.h,
|
||||||
|
),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.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: () {
|
||||||
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onShow() {}
|
||||||
|
|
||||||
void onShow(){
|
void onHide() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void onHide(){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,10 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
allLock(),
|
allLock(),
|
||||||
@ -33,25 +36,33 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 10,
|
||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 10,
|
||||||
children: [
|
children: [
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.doorLock!.tr, (){
|
lockTypeItem('images/lockType/lockType_doorLock.png',
|
||||||
|
TranslationLoader.lanKeys!.doorLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.padlock!.tr, (){
|
lockTypeItem('images/lockType/lockType_padlock.png',
|
||||||
|
TranslationLoader.lanKeys!.padlock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.safeLock!.tr, (){
|
lockTypeItem('images/lockType/lockType_safeLock.png',
|
||||||
|
TranslationLoader.lanKeys!.safeLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.intelligentLockCore!.tr, (){
|
lockTypeItem(
|
||||||
|
'images/lockType/lockType_intelligentLockCore.png',
|
||||||
|
TranslationLoader.lanKeys!.intelligentLockCore!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.parkingLock!.tr, (){
|
lockTypeItem('images/lockType/lockType_parkingLock.png',
|
||||||
|
TranslationLoader.lanKeys!.parkingLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.bicycleLock!.tr, (){
|
lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||||
|
TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.longRangeControl!.tr, (){
|
lockTypeItem('images/lockType/lockType_remoteControl.png',
|
||||||
|
TranslationLoader.lanKeys!.longRangeControl!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.addLockPage);
|
Navigator.pushNamed(context, Routers.addLockPage);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -63,12 +74,9 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget allLock() {
|
Widget allLock() {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: (){
|
onTap: () {},
|
||||||
|
|
||||||
},
|
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 150.h,
|
height: 150.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -76,20 +84,32 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 40.w),
|
SizedBox(width: 40.w),
|
||||||
Image.asset('images/icon_lock.png', width: 80.w, height: 100.w,),
|
Image.asset(
|
||||||
|
'images/lockType/lockType_allLocks.png',
|
||||||
|
width: 88.w,
|
||||||
|
height: 80.w,
|
||||||
|
),
|
||||||
SizedBox(width: 40.w),
|
SizedBox(width: 40.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.allLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
Text(TranslationLoader.lanKeys!.allLock!.tr,
|
||||||
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
style: TextStyle(
|
||||||
|
fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||||
|
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 40.w),
|
SizedBox(width: 40.w),
|
||||||
Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
|
Image.asset(
|
||||||
|
'images/icon_right.png',
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
),
|
||||||
SizedBox(width: 40.w),
|
SizedBox(width: 40.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -97,7 +117,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget lockTypeItem(String lockTypeIcon, String lockTypeTitle, Function() action){
|
Widget lockTypeItem(
|
||||||
|
String lockTypeIcon, String lockTypeTitle, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -107,19 +128,29 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Image.asset(lockTypeIcon, width: 40.w, height: 50.w,),
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 40.w,
|
||||||
|
height: 57.w,
|
||||||
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(lockTypeTitle, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
Text(lockTypeTitle,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
|
Image.asset(
|
||||||
|
'images/icon_right.png',
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
),
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -127,9 +158,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onShow(){
|
void onShow() {}
|
||||||
}
|
|
||||||
|
|
||||||
void onHide(){
|
void onHide() {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,42 +19,65 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, Routers.seletGatewayTypePage);
|
Navigator.pushNamed(context, Routers.seletGatewayTypePage);
|
||||||
},
|
},
|
||||||
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
|
child: Image.asset(
|
||||||
|
'images/icon_add_white.png',
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.w,
|
||||||
|
)),
|
||||||
|
SizedBox(
|
||||||
|
width: 30.w,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
SizedBox(width: 30.w,),
|
|
||||||
],),
|
|
||||||
body: ListView.builder(
|
body: ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _gatewatListItem('images/mine/icon_mine_gatewayListMainIcon.png', "星锁网关", "在线", "2", (){
|
return _gatewatListItem(
|
||||||
|
'images/mine/icon_mine_gatewayListMainIcon.png',
|
||||||
|
"星锁网关",
|
||||||
|
"在线",
|
||||||
|
"2", () {
|
||||||
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||||
});
|
});
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 100.h,
|
// height: 100.h,
|
||||||
margin: const EdgeInsets.only(bottom: 2),
|
margin: const EdgeInsets.only(bottom: 2),
|
||||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
padding:
|
||||||
|
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
borderRadius: BorderRadius.circular(10.w),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 10.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 90.w, height: 90.w,),
|
width: 10.w,
|
||||||
SizedBox(width: 20.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -64,7 +87,11 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
gateWayName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -73,13 +100,35 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.asset('images/mine/icon_mine_gatewayListOnline.png', width: 40.w, height: 40.w,),
|
Image.asset(
|
||||||
SizedBox(width: 10.w,),
|
'images/mine/icon_mine_gatewayListOnline.png',
|
||||||
Text("在线", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
width: 40.w,
|
||||||
SizedBox(width: 80.w,),
|
height: 40.w,
|
||||||
Image.asset('images/mine/icon_mine_gatewayListNumber.png', width: 40.w, height: 40.w,),
|
),
|
||||||
SizedBox(width: 10.w,),
|
SizedBox(
|
||||||
Text("2", style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
width: 10.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"在线",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 80.w,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/mine/icon_mine_gatewayListNumber.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 10.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"2",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -88,7 +137,6 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 20.h),
|
SizedBox(width: 20.h),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -20,34 +19,47 @@ class _MessageListPageState extends State<MessageListPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.message!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.message!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
body: ListView.builder(
|
body: ListView.builder(
|
||||||
itemCount: 10,
|
itemCount: 10,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "您的钥匙已发送成功", "2023.6.21 11.15", (){
|
return _seletGatewayListListItem('images/icon_lockGroup_item.png',
|
||||||
|
"您的钥匙已发送成功", "2023.6.21 11.15", () {
|
||||||
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
// 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(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 100.h,
|
// height: 100.h,
|
||||||
margin: const EdgeInsets.only(bottom: 2),
|
margin: const EdgeInsets.only(bottom: 2),
|
||||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
padding:
|
||||||
|
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
borderRadius: BorderRadius.circular(10.w),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 10.w,),
|
SizedBox(
|
||||||
Image.asset(lockTypeIcon, width: 80.w, height: 80.w,),
|
width: 10.w,
|
||||||
SizedBox(width: 20.w,),
|
),
|
||||||
|
Image.asset(
|
||||||
|
lockTypeIcon,
|
||||||
|
width: 80.w,
|
||||||
|
height: 80.w,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -57,7 +69,11 @@ class _MessageListPageState extends State<MessageListPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(gateWayName, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
gateWayName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -68,7 +84,11 @@ class _MessageListPageState extends State<MessageListPage> {
|
|||||||
children: [
|
children: [
|
||||||
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||||
// SizedBox(width: 10.w,),
|
// SizedBox(width: 10.w,),
|
||||||
Text(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
Text(
|
||||||
|
networkSignal,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -81,5 +101,4 @@ class _MessageListPageState extends State<MessageListPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class _AuthorizedAdministratorListPageState
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import '../../../../appRouters.dart';
|
|||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
import '../../../tools/submitBtn.dart';
|
|
||||||
|
|
||||||
class LockUserManageListListPage extends StatefulWidget {
|
class LockUserManageListListPage extends StatefulWidget {
|
||||||
const LockUserManageListListPage({Key? key}) : super(key: key);
|
const LockUserManageListListPage({Key? key}) : super(key: key);
|
||||||
@ -40,16 +39,25 @@ class _LockUserManageListListPageState
|
|||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
Expanded(child: _buildMainUI()),
|
Expanded(child: _buildMainUI()),
|
||||||
SubmitBtn(
|
SizedBox(
|
||||||
btnName: TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
borderRadius: 20.w,
|
height: 80.h,
|
||||||
margin: EdgeInsets.only(
|
child: ElevatedButton(
|
||||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
style: ElevatedButton.styleFrom(
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
backgroundColor: Colors.white,
|
||||||
onClick: () {
|
),
|
||||||
Navigator.pushNamed(
|
onPressed: () {},
|
||||||
context, Routers.massSendElectronicKeyManagePage);
|
child: Text(
|
||||||
}),
|
'群发钥匙',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
fontSize: 28.sp,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 64.h,
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -57,7 +65,7 @@ class _LockUserManageListListPageState
|
|||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 80.h,
|
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: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||||
|
|||||||
@ -98,7 +98,10 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {}),
|
action: () {
|
||||||
|
Navigator.pushNamed(
|
||||||
|
context, Routers.selectGetewayListPage);
|
||||||
|
}),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
|
|||||||
@ -0,0 +1,132 @@
|
|||||||
|
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';
|
||||||
|
|
||||||
|
class SelectGetewayListPage extends StatefulWidget {
|
||||||
|
const SelectGetewayListPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SelectGetewayListPage> createState() => _SelectGetewayListPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelectGetewayListPageState extends State<SelectGetewayListPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: TranslationLoader.lanKeys!.selectGateway!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
'全选',
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 28.sp),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Expanded(child: _buildMainUI()),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
|
_buildNextBtn(),
|
||||||
|
SizedBox(
|
||||||
|
height: 64.h,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildMainUI() {
|
||||||
|
return ListView.separated(
|
||||||
|
itemCount: 10,
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return Divider(
|
||||||
|
height: 1,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemBuilder: (c, index) {
|
||||||
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
|
Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: 70.h,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 20.w,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_round_unSelet.png',
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 16.w,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'images/getewayType_G2.png',
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 16.w,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'星锁网关',
|
||||||
|
style: TextStyle(fontSize: 28.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildNextBtn() {
|
||||||
|
return GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.grey,
|
||||||
|
width: ScreenUtil().screenWidth,
|
||||||
|
height: 64.h,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pushNamed(context, Routers.recipientInformationPage);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'下一步',
|
||||||
|
style: TextStyle(fontSize: 28.sp, color: Colors.white),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -32,7 +32,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: allHeight ?? 70.h,
|
height: allHeight ?? 60.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 20.w, right: 10.w), // , top: 20.w, bottom: 20.w
|
left: 20.w, right: 10.w), // , top: 20.w, bottom: 20.w
|
||||||
|
|||||||
@ -4,13 +4,11 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
|
|
||||||
import '../app_settings/app_colors.dart';
|
import '../app_settings/app_colors.dart';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 提交按钮 公用组件
|
* 提交按钮 公用组件
|
||||||
* */
|
* */
|
||||||
|
|
||||||
class SubmitBtn extends StatelessWidget {
|
class SubmitBtn extends StatelessWidget {
|
||||||
|
|
||||||
String? btnName;
|
String? btnName;
|
||||||
|
|
||||||
Function()? onClick;
|
Function()? onClick;
|
||||||
@ -29,10 +27,39 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
|
|
||||||
double? borderRadius;
|
double? borderRadius;
|
||||||
|
|
||||||
SubmitBtn({Key? key, required this.btnName,this.borderRadius,this.color,this.padding,this.onClick,this.margin,this.width,this.backgroundColorList,this.fontSize}) : super(key: key);
|
SubmitBtn(
|
||||||
|
{Key? key,
|
||||||
|
required this.btnName,
|
||||||
|
this.borderRadius,
|
||||||
|
this.color,
|
||||||
|
this.padding,
|
||||||
|
this.onClick,
|
||||||
|
this.margin,
|
||||||
|
this.width,
|
||||||
|
this.backgroundColorList,
|
||||||
|
this.fontSize})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: ScreenUtil().screenWidth - 40.w,
|
||||||
|
height: 44,
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (onClick != null) {
|
||||||
|
onClick!();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
btnName!,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 30.sp),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
/*
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: width??690.w,
|
width: width??690.w,
|
||||||
@ -42,23 +69,24 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
margin: margin??EdgeInsets.only(top: 30.w),
|
margin: margin??EdgeInsets.only(top: 30.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(borderRadius??30.w),
|
borderRadius: BorderRadius.circular(borderRadius ?? 10.w),
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.centerLeft,
|
begin: Alignment.centerLeft,
|
||||||
end: Alignment.centerRight,
|
end: Alignment.centerRight,
|
||||||
colors: backgroundColorList??[
|
colors: backgroundColorList ??
|
||||||
AppColors.mainColor,AppColors.mainColor,
|
[
|
||||||
|
AppColors.mainColor,
|
||||||
|
AppColors.mainColor,
|
||||||
],
|
],
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(btnName!,style: TextStyle(
|
child: Text(btnName!,
|
||||||
fontSize: fontSize??36.sp,
|
style: TextStyle(
|
||||||
|
fontSize: fontSize ?? 30.sp,
|
||||||
height: 1.3,
|
height: 1.3,
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: color??Colors.white
|
color: color ?? Colors.white)),
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -67,5 +95,6 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,7 @@ flutter:
|
|||||||
- images/main/
|
- images/main/
|
||||||
- images/lan/
|
- images/lan/
|
||||||
- images/mine/
|
- images/mine/
|
||||||
|
- images/lockType/
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||||
|
|
||||||
|
|||||||