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(
|
||||||
TextButton(
|
barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
haveBack: true,
|
||||||
onPressed: (){
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
},),
|
TextButton(
|
||||||
],),
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
@ -35,24 +42,23 @@ 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);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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,40 +73,54 @@ 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
Widget _buildMainUI() {
|
||||||
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(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
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: 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,23 +128,31 @@ 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),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -19,87 +19,108 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
@override
|
@override
|
||||||
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),
|
||||||
},),
|
|
||||||
],),
|
|
||||||
body: Column(
|
|
||||||
children: [
|
|
||||||
_searchWidget(),
|
|
||||||
Expanded(child: _buildMainUI()),
|
|
||||||
SubmitBtn(
|
|
||||||
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
|
||||||
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: (){
|
|
||||||
Navigator.pushNamed(context, Routers.sendElectronicKeyManagePage);
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
],
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
_searchWidget(),
|
||||||
|
Expanded(child: _buildMainUI()),
|
||||||
|
SubmitBtn(
|
||||||
|
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
||||||
|
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: () {
|
||||||
|
Navigator.pushNamed(
|
||||||
|
context, Routers.sendElectronicKeyManagePage);
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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,
|
// controller: _controller,
|
||||||
// controller: _controller,
|
autofocus: false,
|
||||||
autofocus: false,
|
decoration: InputDecoration(
|
||||||
decoration: InputDecoration(
|
//输入里面输入文字内边距设置
|
||||||
//输入里面输入文字内边距设置
|
contentPadding: const EdgeInsets.only(
|
||||||
contentPadding: const EdgeInsets.only(
|
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
//不需要输入框下划线
|
||||||
//不需要输入框下划线
|
border: InputBorder.none,
|
||||||
border: InputBorder.none,
|
//左边图标设置
|
||||||
//左边图标设置
|
icon: Padding(
|
||||||
icon: Padding(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 20.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,),
|
child: Image.asset(
|
||||||
),
|
'images/main/icon_main_search.png',
|
||||||
|
width: 40.w,
|
||||||
|
height: 40.w,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}
|
),
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
|
||||||
return ListView.builder(
|
|
||||||
itemCount:10,
|
|
||||||
itemBuilder: (c, index){
|
|
||||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle, String beginTime, String endTime, Function() action){
|
Widget _buildMainUI() {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: 10,
|
||||||
|
itemBuilder: (c, index) {
|
||||||
|
return _electronicKeyItem('images/icon_lock.png', "张三",
|
||||||
|
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||||
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||||
|
String beginTime, String endTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
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: 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,26 +130,38 @@ 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(
|
||||||
SizedBox(width:20.w),
|
lockTypeTitle,
|
||||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
Text(
|
||||||
|
"待接收",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.w),
|
SizedBox(width: 20.w),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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';
|
||||||
@ -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,43 +20,48 @@ 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(
|
||||||
body:Container(
|
barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: Container(
|
||||||
padding: EdgeInsets.all(30.w),
|
padding: EdgeInsets.all(30.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
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,40 +76,54 @@ 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
Widget _buildMainUI() {
|
||||||
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(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(top: 15.h),
|
margin: EdgeInsets.only(top: 15.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: 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,30 +133,41 @@ 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(
|
||||||
SizedBox(width:20.w),
|
lockTypeTitle,
|
||||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
style: TextStyle(
|
||||||
|
fontSize: 32.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
Text(
|
||||||
|
"待接收",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.w),
|
SizedBox(width: 20.w),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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';
|
||||||
@ -19,103 +18,146 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
@override
|
@override
|
||||||
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(
|
||||||
body: Column(
|
barTitle: TranslationLoader.lanKeys!.starLock!.tr,
|
||||||
children: [
|
haveBack: true,
|
||||||
topWidget(),
|
backgroundColor: AppColors.mainColor),
|
||||||
Expanded(child: bottomWidget())
|
body: Column(
|
||||||
],
|
children: [topWidget(), Expanded(child: bottomWidget())],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget topWidget(){
|
Widget topWidget() {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height:40.h),
|
SizedBox(height: 40.h),
|
||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
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",
|
||||||
Row(
|
style:
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||||
children: [
|
)),
|
||||||
Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
Row(
|
||||||
SizedBox(width:5.w),
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
|
|
||||||
SizedBox(width:30.w),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 40.h),
|
|
||||||
Container(
|
|
||||||
width: 1.sw,
|
|
||||||
height: 280.w,
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
children: [
|
||||||
Center(child: Image.asset('images/main/icon_main_openLockBtn.png', width: 280.w, height: 280.w)),
|
Text(
|
||||||
Align(
|
"100%",
|
||||||
alignment: const Alignment(0.5, 1),
|
style:
|
||||||
child: Image.asset('images/main/icon_main_remoteUnlocking.png', width: 90.w, height: 90.w,)
|
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(height: 40.h,),
|
),
|
||||||
Row(
|
SizedBox(height: 40.h),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
Container(
|
||||||
|
width: 1.sw,
|
||||||
|
height: 280.w,
|
||||||
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Text(TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr, style: TextStyle(fontSize: 28.sp, color: const Color(0xFFB3B3B3), fontWeight: FontWeight.w500),),
|
Center(
|
||||||
|
child: Image.asset('images/main/icon_main_openLockBtn.png',
|
||||||
|
width: 280.w, height: 280.w)),
|
||||||
|
Align(
|
||||||
|
alignment: const Alignment(0.5, 1),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/main/icon_main_remoteUnlocking.png',
|
||||||
|
width: 90.w,
|
||||||
|
height: 90.w,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 40.h,),
|
),
|
||||||
Container(height: 0.5.h, color: Colors.grey,)
|
SizedBox(
|
||||||
],
|
height: 40.h,
|
||||||
);
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
TranslationLoader.lanKeys!.clickUnlockAndHoldDownClose!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.sp,
|
||||||
|
color: const Color(0xFFB3B3B3),
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 40.h,
|
||||||
|
),
|
||||||
|
Divider(
|
||||||
|
height: 1,
|
||||||
|
color: const Color(0xFFB3B3B3),
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget bottomWidget(){
|
Widget bottomWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(left:10.w, right:10.w, top: 25.h),
|
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 25.h),
|
||||||
// color: Colors.blue,
|
// color: Colors.blue,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
child:GridView.count(
|
child: GridView.count(
|
||||||
crossAxisCount: 4,
|
crossAxisCount: 4,
|
||||||
// childAspectRatio: 3,
|
// childAspectRatio: 3,
|
||||||
crossAxisSpacing: 20.w,
|
crossAxisSpacing: 20.w,
|
||||||
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);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -124,27 +166,31 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget bottomItem(String iconUrl,String name, Function() onClick){
|
Widget bottomItem(String iconUrl, String name, Function() onClick) {
|
||||||
var width = 65.w;
|
var width = 65.w;
|
||||||
var height = 70.h;
|
var height = 70.h;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap:onClick,
|
onTap: onClick,
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 300.h,
|
// height: 300.h,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
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,29 +20,42 @@ 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(
|
||||||
TextButton(
|
barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||||
child: const Text("操作", style: TextStyle(color: Colors.white),),
|
haveBack: true,
|
||||||
onPressed: (){
|
backgroundColor: AppColors.mainColor,
|
||||||
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
actionsList: [
|
||||||
print('选中index: $index');
|
TextButton(
|
||||||
print('选中text: $selText');
|
child: const Text(
|
||||||
|
"操作",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
||||||
|
print('选中index: $index');
|
||||||
|
print('选中text: $selText');
|
||||||
|
|
||||||
if (selText == '添加朋友') {
|
if (selText == '添加朋友') {
|
||||||
// JhNavUtils.pushNamed(context, 'WxAddFriendPage');
|
// JhNavUtils.pushNamed(context, 'WxAddFriendPage');
|
||||||
}
|
}
|
||||||
if (selText == '扫一扫') {
|
if (selText == '扫一扫') {
|
||||||
// _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()),
|
||||||
@ -51,13 +64,12 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _searchWidget(){
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
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,84 +85,109 @@ 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
Widget _buildMainUI() {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
itemCount:20,
|
itemCount: 20,
|
||||||
itemBuilder: (c, index){
|
itemBuilder: (c, index) {
|
||||||
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) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 70.h,
|
height: 70.h,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
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,
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
borderRadius: BorderRadius.circular(10.w),
|
||||||
),
|
),
|
||||||
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),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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';
|
||||||
@ -17,38 +16,46 @@ 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(
|
||||||
TextButton(
|
barTitle: getAppBarTitle(type),
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
haveBack: true,
|
||||||
onPressed: (){
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
},),
|
TextButton(
|
||||||
],),
|
child: Text(
|
||||||
|
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);
|
||||||
),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String getAppBarTitle(int type){
|
String getAppBarTitle(int type) {
|
||||||
String title = "";
|
String title = "";
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -66,13 +73,12 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
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,40 +93,55 @@ 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(int type){
|
Widget _buildMainUI(int type) {
|
||||||
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(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
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: 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,23 +149,31 @@ 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),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -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(
|
||||||
TextButton(
|
barTitle: TranslationLoader.lanKeys!.password!.tr,
|
||||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
haveBack: true,
|
||||||
onPressed: (){
|
backgroundColor: AppColors.mainColor,
|
||||||
|
actionsList: [
|
||||||
},),
|
TextButton(
|
||||||
],),
|
child: Text(
|
||||||
|
TranslationLoader.lanKeys!.reset!.tr,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_searchWidget(),
|
_searchWidget(),
|
||||||
@ -34,24 +41,23 @@ 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);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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,40 +72,54 @@ 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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildMainUI(){
|
Widget _buildMainUI() {
|
||||||
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(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
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: 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,23 +127,31 @@ 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),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -16,54 +16,66 @@ class AddLockPage extends StatefulWidget {
|
|||||||
State<AddLockPage> createState() => _AddLockPageState();
|
State<AddLockPage> createState() => _AddLockPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
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),
|
onClick: () {
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
|
||||||
onClick: (){
|
|
||||||
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
Navigator.pushNamed(context, Routers.nearbyLockPage);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onShow() {}
|
||||||
|
|
||||||
void onShow(){
|
void onHide() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void onHide(){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,12 +15,15 @@ class SeletLockTypePage extends StatefulWidget {
|
|||||||
State<SeletLockTypePage> createState() => _SeletLockTypePageState();
|
State<SeletLockTypePage> createState() => _SeletLockTypePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||||
@override
|
@override
|
||||||
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,41 +74,51 @@ 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,
|
||||||
margin: const EdgeInsets.all(10),
|
margin: const EdgeInsets.all(10),
|
||||||
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(
|
||||||
SizedBox(width:40.w),
|
'images/lockType/lockType_allLocks.png',
|
||||||
|
width: 88.w,
|
||||||
|
height: 80.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(
|
||||||
SizedBox(width:40.w),
|
'images/icon_right.png',
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 40.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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(
|
||||||
@ -106,30 +127,38 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
|||||||
// margin: EdgeInsets.all(10),
|
// margin: EdgeInsets.all(10),
|
||||||
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(
|
||||||
SizedBox(width:20.w),
|
lockTypeIcon,
|
||||||
|
width: 40.w,
|
||||||
|
height: 57.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(
|
||||||
SizedBox(width:20.w),
|
'images/icon_right.png',
|
||||||
|
width: 60.w,
|
||||||
|
height: 60.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
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(
|
||||||
GestureDetector(
|
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
||||||
onTap: (){
|
haveBack: true,
|
||||||
Navigator.pushNamed(context, Routers.seletGatewayTypePage);
|
backgroundColor: AppColors.mainColor,
|
||||||
},
|
actionsList: [
|
||||||
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
|
GestureDetector(
|
||||||
),
|
onTap: () {
|
||||||
SizedBox(width: 30.w,),
|
Navigator.pushNamed(context, Routers.seletGatewayTypePage);
|
||||||
],),
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_add_white.png',
|
||||||
|
width: 50.w,
|
||||||
|
height: 50.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:
|
||||||
decoration: BoxDecoration(
|
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||||
|
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,31 +87,56 @@ 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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height:5.h),
|
SizedBox(height: 5.h),
|
||||||
Container(
|
Container(
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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:
|
||||||
decoration: BoxDecoration(
|
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||||
|
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,22 +69,30 @@ 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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height:5.h),
|
SizedBox(height: 5.h),
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
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),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width:20.h),
|
SizedBox(width: 20.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -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,
|
||||||
@ -41,31 +68,33 @@ class SubmitBtn extends StatelessWidget {
|
|||||||
bottom: 20.w
|
bottom: 20.w
|
||||||
),
|
),
|
||||||
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(
|
||||||
height: 1.3,
|
fontSize: fontSize ?? 30.sp,
|
||||||
decoration: TextDecoration.none,
|
height: 1.3,
|
||||||
fontWeight: FontWeight.w500,
|
decoration: TextDecoration.none,
|
||||||
color: color??Colors.white
|
fontWeight: FontWeight.w500,
|
||||||
)),
|
color: color ?? Colors.white)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: (){
|
onTap: () {
|
||||||
if(onClick!=null){
|
if (onClick != null) {
|
||||||
onClick!();
|
onClick!();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||