Daisy 3840f0c8c8 1,更新剩余部分UI
2,新增部分界面
3,新增公共组件底部白色添加按钮
2023-07-29 17:04:03 +08:00

102 lines
2.9 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.separated(
itemCount: 5,
itemBuilder: (c, index) {
return nearbyLockItem(
'images/icon_lockGroup_item.png', "MCBN01-ea9240", () {
Navigator.pushNamed(context, Routers.lockAddressPage);
});
},
separatorBuilder: (BuildContext context, int index) {
return Divider(
height: 1,
color: AppColors.greyLineColor,
indent: 20.w,
endIndent: 0,
);
},
),
);
}
Widget nearbyLockItem(
String lockTypeIcon, String lockTypeTitle, Function() action) {
return GestureDetector(
onTap: action,
child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 89.h,
color: Colors.white,
child: Row(
children: [
SizedBox(width: 20.w),
Image.asset(
lockTypeIcon,
width: 56.w,
height: 56.w,
),
SizedBox(width: 20.w),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
lockTypeTitle,
style: TextStyle(
fontSize: 20.sp, color: AppColors.blackColor),
),
],
),
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: 36.w,
height: 36.w,
),
SizedBox(width: 30.w),
],
),
),
],
),
);
}
void onShow() {}
void onHide() {}
}