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

134 lines
3.4 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/titleAppBar.dart';
import '../../../../translations/trans_lib.dart';
class SelectBranchPage extends StatefulWidget {
const SelectBranchPage({Key? key}) : super(key: key);
@override
State<SelectBranchPage> createState() => _SelectBranchPageState();
}
class _SelectBranchPageState extends State<SelectBranchPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.recipientInformation!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
),
body: Column(
children: [
_buildTopView(),
SizedBox(
height: 20.h,
),
Expanded(child: _buildMainUI()),
_buildNextBtn(),
SizedBox(
height: 64.h,
)
],
),
);
}
Widget _buildTopView() {
return Container(
height: 120.h,
width: ScreenUtil().screenWidth,
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 40.w, top: 20.h, bottom: 16.h),
child: Text(
'公寓',
style: TextStyle(fontSize: 28.sp),
),
),
Padding(
padding: EdgeInsets.only(left: 40.w),
child: Text('管理员18682150237',
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 24.sp)),
)
],
),
);
}
Widget _buildMainUI() {
return ListView.separated(
itemCount: 5,
separatorBuilder: (context, index) {
return Divider(
height: 1,
indent: 20.w,
endIndent: 20.w,
color: AppColors.greyLineColor,
);
},
itemBuilder: (c, index) {
return _electronicKeyItem('images/select_circle.png', "分组一", () {});
});
}
Widget _electronicKeyItem(
String leftIcon, String leftTitle, Function() action) {
return GestureDetector(
child: Container(
color: Colors.white,
height: 70.h,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 40.w,
),
GestureDetector(
child: Image.asset(
leftIcon,
width: 16,
height: 16,
),
),
SizedBox(
width: 16.w,
),
Text(
leftTitle,
style: TextStyle(fontSize: 28.sp),
)
],
),
),
onTap: () {},
);
}
Widget _buildNextBtn() {
return GestureDetector(
child: Container(
color: AppColors.mainColor,
width: ScreenUtil().screenWidth,
height: 64.h,
child: TextButton(
onPressed: () {},
child: Text(
'下一步',
style: TextStyle(fontSize: 28.sp, color: Colors.white),
)),
),
);
}
}