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":"星锁",
|
||||
"clickUnlockAndHoldDownClose":"点击开锁,长按关闭",
|
||||
"clickUnlockAndHoldDownClose":"点击开锁,长按关闭",
|
||||
"checkingIn":"考勤",
|
||||
"electronicKey":"电子钥匙",
|
||||
"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/lockUserManage/lockUserManageList_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/selectBranch_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 recipientInformationPage = '/recipientInformationPage'; //接受人信息
|
||||
static const selectBranchPage = '/SelectBranchPage'; //选择分店
|
||||
static const selectGetewayListPage = '/selectGetewayListPage'; //选择网关
|
||||
|
||||
static const starLockLoginPage = '/StarLockLoginPage'; // 登录
|
||||
static const starLockRegisterPage = '/StarLockRegisterPage'; // 注册
|
||||
@ -670,6 +672,9 @@ abstract class AppRouters {
|
||||
name: Routers.recipientInformationPage,
|
||||
page: () => const RecipientInformationPage()),
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -13,7 +12,8 @@ class AuthorizedAdminListPage extends StatefulWidget {
|
||||
const AuthorizedAdminListPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AuthorizedAdminListPage> createState() => _AuthorizedAdminListPageState();
|
||||
State<AuthorizedAdminListPage> createState() =>
|
||||
_AuthorizedAdminListPageState();
|
||||
}
|
||||
|
||||
class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
@ -21,13 +21,20 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_searchWidget(),
|
||||
@ -35,24 +42,23 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.authorizedAdminManagePage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _searchWidget(){
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 80.h,
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
@ -67,40 +73,54 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
padding: EdgeInsets.only(
|
||||
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(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||
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.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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -108,23 +128,31 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.electronicKey!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.electronicKey!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
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);
|
||||
}
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
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(
|
||||
height: 80.h,
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
),
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
// controller: _controller,
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
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(){
|
||||
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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -109,26 +130,38 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,7 +11,8 @@ class ImportOtherLockDataPage extends StatefulWidget {
|
||||
const ImportOtherLockDataPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ImportOtherLockDataPage> createState() => _ImportOtherLockDataPageState();
|
||||
State<ImportOtherLockDataPage> createState() =>
|
||||
_ImportOtherLockDataPageState();
|
||||
}
|
||||
|
||||
class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
@ -20,43 +20,48 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body:Container(
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.importOtherLockData!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text(TranslationLoader.lanKeys!.importOtherLockDataTip!.tr)),
|
||||
Expanded(
|
||||
child: Text(TranslationLoader
|
||||
.lanKeys!.importOtherLockDataTip!.tr)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.h,),
|
||||
SizedBox(
|
||||
height: 20.h,
|
||||
),
|
||||
_searchWidget(),
|
||||
SizedBox(height: 10.h,),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
|
||||
}
|
||||
),
|
||||
onClick: () {}),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget _searchWidget(){
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 70.h,
|
||||
height: 60.h,
|
||||
// margin: EdgeInsets.only(top:20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
@ -71,40 +76,54 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
padding: EdgeInsets.only(
|
||||
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(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||
itemCount: 20,
|
||||
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 _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,
|
||||
String beginTime, String endTime, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(top: 15.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -114,30 +133,41 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(lockTypeTitle, style: TextStyle(fontSize: 32.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:20.w),
|
||||
Text("待接收", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
Text(
|
||||
lockTypeTitle,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -19,103 +18,146 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.starLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
topWidget(),
|
||||
Expanded(child: bottomWidget())
|
||||
],
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.starLock!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [topWidget(), Expanded(child: bottomWidget())],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget topWidget(){
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(height:40.h),
|
||||
Stack(
|
||||
alignment: Alignment.centerRight,
|
||||
children: [
|
||||
Align(
|
||||
alignment:Alignment.center,
|
||||
child: Text("MCBN01-ea9240", style: TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),)
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text("100%", style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500), ),
|
||||
SizedBox(width:5.w),
|
||||
Image.asset('images/main/icon_main_cell.png', width: 50.w, height: 50.w,),
|
||||
SizedBox(width:30.w),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 40.h),
|
||||
Container(
|
||||
width: 1.sw,
|
||||
height: 280.w,
|
||||
child: Stack(
|
||||
Widget topWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
SizedBox(height: 40.h),
|
||||
Stack(
|
||||
alignment: Alignment.centerRight,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"MCBN01-ea9240",
|
||||
style:
|
||||
TextStyle(fontSize: 36.sp, fontWeight: FontWeight.w500),
|
||||
)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
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,)
|
||||
Text(
|
||||
"100%",
|
||||
style:
|
||||
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(width: 5.w),
|
||||
Image.asset(
|
||||
'images/main/icon_main_cell.png',
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(width: 30.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 40.h,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
],
|
||||
),
|
||||
SizedBox(height: 40.h),
|
||||
Container(
|
||||
width: 1.sw,
|
||||
height: 280.w,
|
||||
child: Stack(
|
||||
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(
|
||||
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,
|
||||
child: SizedBox(
|
||||
child:GridView.count(
|
||||
child: GridView.count(
|
||||
crossAxisCount: 4,
|
||||
// childAspectRatio: 3,
|
||||
crossAxisSpacing: 20.w,
|
||||
mainAxisSpacing: 10.h,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
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);
|
||||
}),
|
||||
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);
|
||||
}),
|
||||
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);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 0);
|
||||
bottomItem('images/main/icon_main_icCard.png',
|
||||
TranslationLoader.lanKeys!.card!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||
arguments: 0);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 1);
|
||||
bottomItem('images/main/icon_main_fingerprint.png',
|
||||
TranslationLoader.lanKeys!.fingerprint!.tr, () {
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage,
|
||||
arguments: 1);
|
||||
}),
|
||||
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyListPage, arguments: 2);
|
||||
bottomItem('images/main/icon_main_remoteControl.png',
|
||||
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);
|
||||
}),
|
||||
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);
|
||||
}),
|
||||
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);
|
||||
}),
|
||||
],
|
||||
@ -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 height = 70.h;
|
||||
return GestureDetector(
|
||||
onTap:onClick,
|
||||
onTap: onClick,
|
||||
child: Container(
|
||||
// height: 300.h,
|
||||
color: Colors.white,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: width,
|
||||
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),
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,7 +11,8 @@ class LockOperatingRecordPage extends StatefulWidget {
|
||||
const LockOperatingRecordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState();
|
||||
State<LockOperatingRecordPage> createState() =>
|
||||
_LockOperatingRecordPageState();
|
||||
}
|
||||
|
||||
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
@ -20,29 +20,42 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle:TranslationLoader.lanKeys!.operatingRecord!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: const Text("操作", style: TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
||||
print('选中index: $index');
|
||||
print('选中text: $selText');
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: const Text(
|
||||
"操作",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {
|
||||
JhPopMenus.showLinePop(context, clickCallback: (index, selText) {
|
||||
print('选中index: $index');
|
||||
print('选中text: $selText');
|
||||
|
||||
if (selText == '添加朋友') {
|
||||
// JhNavUtils.pushNamed(context, 'WxAddFriendPage');
|
||||
}
|
||||
if (selText == '扫一扫') {
|
||||
// _scan();
|
||||
}
|
||||
});
|
||||
},),
|
||||
],),
|
||||
if (selText == '添加朋友') {
|
||||
// JhNavUtils.pushNamed(context, 'WxAddFriendPage');
|
||||
}
|
||||
if (selText == '扫一扫') {
|
||||
// _scan();
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
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(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
@ -51,13 +64,12 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _searchWidget(){
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
@ -73,84 +85,109 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
padding: EdgeInsets.only(
|
||||
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(
|
||||
itemCount:20,
|
||||
itemBuilder: (c, index){
|
||||
if(index%2 == 0){
|
||||
itemCount: 20,
|
||||
itemBuilder: (c, index) {
|
||||
if (index % 2 == 0) {
|
||||
return _dateItem("2023-06-29");
|
||||
}else{
|
||||
return _operatingRecordItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||
} else {
|
||||
return _operatingRecordItem('images/controls_user.png', "张三",
|
||||
"2023.6.21 11.15", "2023.6.21 11.15", () {
|
||||
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _dateItem(String lockDate){
|
||||
Widget _dateItem(String lockDate) {
|
||||
return Container(
|
||||
height: 70.h,
|
||||
// color: Colors.red,
|
||||
padding: EdgeInsets.only(left:20.h, right: 20.h),
|
||||
padding: EdgeInsets.only(left: 20.h, right: 20.h),
|
||||
child: Row(
|
||||
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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 110.h,
|
||||
height: 90.h,
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -17,38 +16,46 @@ class OtherTypeKeyListPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var type = ModalRoute.of(context)?.settings.arguments as int;
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: getAppBarTitle(type), haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: getAppBarTitle(type),
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI(type)),
|
||||
SubmitBtn(
|
||||
btnName: '${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
|
||||
btnName:
|
||||
'${TranslationLoader.lanKeys!.getTip!.tr} ${getAppBarTitle(type)}',
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage, arguments: type);
|
||||
}
|
||||
),
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.otherTypeKeyManagePage,
|
||||
arguments: type);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String getAppBarTitle(int type){
|
||||
String getAppBarTitle(int type) {
|
||||
String title = "";
|
||||
switch (type) {
|
||||
case 0:
|
||||
@ -66,13 +73,12 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
return title;
|
||||
}
|
||||
|
||||
Widget _searchWidget(){
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 80.h,
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
@ -87,40 +93,55 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
padding: EdgeInsets.only(
|
||||
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(
|
||||
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.otherTypeKeyDetailPage, arguments: type);
|
||||
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.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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -128,23 +149,31 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.password!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
TextButton(
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr, style: const TextStyle(color: Colors.white),),
|
||||
onPressed: (){
|
||||
|
||||
},),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.password!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_searchWidget(),
|
||||
@ -34,24 +41,23 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: (){
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.passwordKeyManagePage);
|
||||
}
|
||||
),
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _searchWidget(){
|
||||
Widget _searchWidget() {
|
||||
return Container(
|
||||
height: 80.h,
|
||||
margin: EdgeInsets.only(top:20.w, left: 20.w, right: 20.w),
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
maxLines: 1,
|
||||
@ -66,40 +72,54 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
border: InputBorder.none,
|
||||
//左边图标设置
|
||||
icon: Padding(
|
||||
padding: EdgeInsets.only(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,),
|
||||
padding: EdgeInsets.only(
|
||||
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(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _electronicKeyItem('images/icon_lock.png', "张三", "2023.6.21 11.15", "2023.6.21 11.15",(){
|
||||
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.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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
height: 100.h,
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 30.w,),
|
||||
Image.asset(lockTypeIcon, width: 50.w, height: 50.w,),
|
||||
SizedBox(width: 30.w,),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 50.w,
|
||||
height: 50.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -107,23 +127,31 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
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();
|
||||
}
|
||||
|
||||
class _AddLockPageState extends State<AddLockPage> with BaseWidget{
|
||||
|
||||
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.addLock!.tr, haveBack:true, backgroundColor: AppColors.mainColor),
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.addLock!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: 100.h,),
|
||||
SizedBox(
|
||||
height: 100.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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,),
|
||||
Image.asset('images/main/icon_main_addLock.png', width: 150.w, height: 150.w,),
|
||||
SizedBox(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(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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(
|
||||
btnName: TranslationLoader.lanKeys!.next!.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: (){
|
||||
onClick: () {
|
||||
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();
|
||||
}
|
||||
|
||||
class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
children: [
|
||||
allLock(),
|
||||
@ -33,25 +36,33 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisSpacing: 10,
|
||||
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);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.padlock!.tr, (){
|
||||
lockTypeItem('images/lockType/lockType_padlock.png',
|
||||
TranslationLoader.lanKeys!.padlock!.tr, () {
|
||||
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);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.intelligentLockCore!.tr, (){
|
||||
lockTypeItem(
|
||||
'images/lockType/lockType_intelligentLockCore.png',
|
||||
TranslationLoader.lanKeys!.intelligentLockCore!.tr, () {
|
||||
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);
|
||||
}),
|
||||
lockTypeItem('images/icon_lock.png', TranslationLoader.lanKeys!.bicycleLock!.tr, (){
|
||||
lockTypeItem('images/lockType/lockType_bicycleLock.png',
|
||||
TranslationLoader.lanKeys!.bicycleLock!.tr, () {
|
||||
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);
|
||||
}),
|
||||
],
|
||||
@ -63,41 +74,51 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget allLock(){
|
||||
Widget allLock() {
|
||||
return GestureDetector(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
onTap: () {},
|
||||
child: Container(
|
||||
height: 150.h,
|
||||
color: Colors.white,
|
||||
margin: const EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:40.w),
|
||||
Image.asset('images/icon_lock.png', width: 80.w, height: 100.w,),
|
||||
SizedBox(width:40.w),
|
||||
SizedBox(width: 40.w),
|
||||
Image.asset(
|
||||
'images/lockType/lockType_allLocks.png',
|
||||
width: 88.w,
|
||||
height: 80.w,
|
||||
),
|
||||
SizedBox(width: 40.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(TranslationLoader.lanKeys!.allLock!.tr, style: TextStyle(fontSize: 30.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys!.searchAllLockType!.tr, style: TextStyle(fontSize: 26.sp, fontWeight: FontWeight.w500)),
|
||||
Text(TranslationLoader.lanKeys!.allLock!.tr,
|
||||
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),
|
||||
Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
|
||||
SizedBox(width:40.w),
|
||||
SizedBox(width: 40.w),
|
||||
Image.asset(
|
||||
'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(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
@ -106,30 +127,38 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget{
|
||||
// margin: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width:20.w),
|
||||
Image.asset(lockTypeIcon, width: 40.w, height: 50.w,),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 40.w,
|
||||
height: 57.w,
|
||||
),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
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),
|
||||
Image.asset('images/icon_right.png', width: 60.w, height: 60.w,),
|
||||
SizedBox(width:20.w),
|
||||
SizedBox(width: 20.w),
|
||||
Image.asset(
|
||||
'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) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.gateway!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [
|
||||
GestureDetector(
|
||||
onTap: (){
|
||||
Navigator.pushNamed(context, Routers.seletGatewayTypePage);
|
||||
},
|
||||
child: Image.asset('images/icon_add_white.png', width: 50.w, height: 50.w,)
|
||||
),
|
||||
SizedBox(width: 30.w,),
|
||||
],),
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.gateway!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
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(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _gatewatListItem('images/mine/icon_mine_gatewayListMainIcon.png', "星锁网关", "在线", "2", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _gatewatListItem(
|
||||
'images/mine/icon_mine_gatewayListMainIcon.png',
|
||||
"星锁网关",
|
||||
"在线",
|
||||
"2", () {
|
||||
Navigator.pushNamed(context, Routers.gatewayDetailPage);
|
||||
});
|
||||
}
|
||||
),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _gatewatListItem(String lockTypeIcon, String gateWayName, String isOnline, String lockNumber, Function() action){
|
||||
Widget _gatewatListItem(String lockTypeIcon, String gateWayName,
|
||||
String isOnline, String lockNumber, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
// height: 100.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 10.w,),
|
||||
Image.asset(lockTypeIcon, width: 90.w, height: 90.w,),
|
||||
SizedBox(width: 20.w,),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 60.w,
|
||||
height: 60.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -64,31 +87,56 @@ class _GatewayListPageState extends State<GatewayListPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Image.asset('images/mine/icon_mine_gatewayListOnline.png', width: 40.w, height: 40.w,),
|
||||
SizedBox(width: 10.w,),
|
||||
Text("在线", style: TextStyle(fontSize: 28.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), ),
|
||||
Image.asset(
|
||||
'images/mine/icon_mine_gatewayListOnline.png',
|
||||
width: 40.w,
|
||||
height: 40.w,
|
||||
),
|
||||
SizedBox(
|
||||
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_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -20,34 +19,47 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
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(
|
||||
itemCount:10,
|
||||
itemBuilder: (c, index){
|
||||
return _seletGatewayListListItem('images/mine/icon_mine_gatewayListMainIcon.png', "您的钥匙已发送成功", "2023.6.21 11.15", (){
|
||||
itemCount: 10,
|
||||
itemBuilder: (c, index) {
|
||||
return _seletGatewayListListItem('images/icon_lockGroup_item.png',
|
||||
"您的钥匙已发送成功", "2023.6.21 11.15", () {
|
||||
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
|
||||
});
|
||||
}
|
||||
),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName, String networkSignal, Function() action){
|
||||
Widget _seletGatewayListListItem(String lockTypeIcon, String gateWayName,
|
||||
String networkSignal, Function() action) {
|
||||
return GestureDetector(
|
||||
onTap: action,
|
||||
child: Container(
|
||||
// height: 100.h,
|
||||
margin: const EdgeInsets.only(bottom: 2),
|
||||
padding: EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
padding:
|
||||
EdgeInsets.only(left: 10.w, right: 20.w, top: 20.h, bottom: 20.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: 10.w,),
|
||||
Image.asset(lockTypeIcon, width: 80.w, height: 80.w,),
|
||||
SizedBox(width: 20.w,),
|
||||
SizedBox(
|
||||
width: 10.w,
|
||||
),
|
||||
Image.asset(
|
||||
lockTypeIcon,
|
||||
width: 80.w,
|
||||
height: 80.w,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@ -57,22 +69,30 @@ class _MessageListPageState extends State<MessageListPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
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(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
// Image.asset('images/mine/icon_mine_gatewaySignal_strong.png', width: 40.w, height: 40.w,),
|
||||
// SizedBox(width: 10.w,),
|
||||
Text(networkSignal, style: TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500), ),
|
||||
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() {
|
||||
return Container(
|
||||
height: 80.h,
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
|
||||
@ -6,7 +6,6 @@ import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../tools/submitBtn.dart';
|
||||
|
||||
class LockUserManageListListPage extends StatefulWidget {
|
||||
const LockUserManageListListPage({Key? key}) : super(key: key);
|
||||
@ -40,16 +39,25 @@ class _LockUserManageListListPageState
|
||||
children: [
|
||||
_searchWidget(),
|
||||
Expanded(child: _buildMainUI()),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sendGroupKey!.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.massSendElectronicKeyManagePage);
|
||||
}),
|
||||
SizedBox(
|
||||
width: ScreenUtil().screenWidth - 40.w,
|
||||
height: 80.h,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () {},
|
||||
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() {
|
||||
return Container(
|
||||
height: 80.h,
|
||||
height: 60.h,
|
||||
margin: EdgeInsets.only(top: 20.w, left: 20.w, right: 20.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(5)),
|
||||
|
||||
@ -98,7 +98,10 @@ class _MineSetPageState extends State<MineSetPage> {
|
||||
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
||||
rightTitle: "",
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
action: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.selectGetewayListPage);
|
||||
}),
|
||||
SizedBox(
|
||||
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,
|
||||
children: [
|
||||
Container(
|
||||
height: allHeight ?? 70.h,
|
||||
height: allHeight ?? 60.h,
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(
|
||||
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';
|
||||
|
||||
|
||||
/*
|
||||
* 提交按钮 公用组件
|
||||
* */
|
||||
|
||||
class SubmitBtn extends StatelessWidget {
|
||||
|
||||
String? btnName;
|
||||
|
||||
Function()? onClick;
|
||||
@ -29,10 +27,39 @@ class SubmitBtn extends StatelessWidget {
|
||||
|
||||
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
|
||||
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(
|
||||
child: Container(
|
||||
width: width??690.w,
|
||||
@ -41,31 +68,33 @@ class SubmitBtn extends StatelessWidget {
|
||||
bottom: 20.w
|
||||
),
|
||||
margin: margin??EdgeInsets.only(top: 30.w),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(borderRadius??30.w),
|
||||
gradient: LinearGradient(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 10.w),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: backgroundColorList??[
|
||||
AppColors.mainColor,AppColors.mainColor,
|
||||
],
|
||||
)
|
||||
),
|
||||
colors: backgroundColorList ??
|
||||
[
|
||||
AppColors.mainColor,
|
||||
AppColors.mainColor,
|
||||
],
|
||||
)),
|
||||
child: Center(
|
||||
child: Text(btnName!,style: TextStyle(
|
||||
fontSize: fontSize??36.sp,
|
||||
height: 1.3,
|
||||
decoration: TextDecoration.none,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: color??Colors.white
|
||||
)),
|
||||
child: Text(btnName!,
|
||||
style: TextStyle(
|
||||
fontSize: fontSize ?? 30.sp,
|
||||
height: 1.3,
|
||||
decoration: TextDecoration.none,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: color ?? Colors.white)),
|
||||
),
|
||||
),
|
||||
onTap: (){
|
||||
if(onClick!=null){
|
||||
onTap: () {
|
||||
if (onClick != null) {
|
||||
onClick!();
|
||||
}
|
||||
},
|
||||
);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,6 +95,7 @@ flutter:
|
||||
- images/main/
|
||||
- images/lan/
|
||||
- images/mine/
|
||||
- images/lockType/
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
||||
|
||||