Daisy 76ceab6f34 1,星锁主界面UI更新
2,锁列表UI更新
3,侧边栏 个人信息模块UI更新
4,添加锁模块UI更新
5,我的-设置模块UI更新
6,新增“添加授权管理员”页面UI布局
2023-07-27 15:26:30 +08:00

97 lines
2.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart';
import '../../../tools/titleAppBar.dart';
import '../../../translations/trans_lib.dart';
class NearbyLockPage extends StatefulWidget {
const NearbyLockPage({Key? key}) : super(key: key);
@override
State<NearbyLockPage> createState() => _NearbyLockPageState();
}
class _NearbyLockPageState extends State<NearbyLockPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.nearbyLock!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem(
'images/icon_lockGroup_item.png', "MCBN01-ea9240", () {
Navigator.pushNamed(context, Routers.lockAddressPage);
});
}),
);
}
Widget nearbyLockItem(
String lockTypeIcon, String lockTypeTitle, Function() action) {
return GestureDetector(
onTap: action,
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 80.h,
color: Colors.white,
child: Row(
children: [
SizedBox(width: 20.w),
Image.asset(
lockTypeIcon,
width: 50.w,
height: 50.w,
),
SizedBox(width: 20.w),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
),
],
),
SizedBox(
width: 10.w,
),
Image.asset(
"images/mine/icon_mine_main_about.png",
width: 22.w,
height: 22.w,
),
Expanded(child: SizedBox(width: 20.w)),
Image.asset(
'images/main/icon_main_addLock.png',
width: 28.w,
height: 28.w,
),
SizedBox(width: 30.w),
],
),
),
Container(
height: 0.5.h,
color: Colors.grey,
)
],
),
);
}
void onShow() {}
void onHide() {}
}