Daisy b1e2cf4ebd 1,新增部分图片
2,新增授权管理员模块UI
3,新增锁分组模块UI
4,新增锁用户管理模块UI
5,新增转移智能锁模块UI
2023-07-25 15:48:40 +08:00

135 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 '../../../../appRouters.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),
)),
),
);
}
}