From 4c3c739c9f4c65d90a027a4c66142d3c7ddfda57 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Wed, 23 Jun 2021 16:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=BF=E5=B1=8B=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=A0=B8=E5=AF=B9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/life_pay/life_pay_page.dart | 64 +---------- .../house/house_information_check_page.dart | 105 ++++++++++++++++++ .../house/supplement_information_page.dart | 5 +- lib/widget/others/house_head_card.dart | 82 ++++++++++++++ 4 files changed, 195 insertions(+), 61 deletions(-) create mode 100644 lib/ui/profile/house/house_information_check_page.dart create mode 100644 lib/widget/others/house_head_card.dart diff --git a/lib/pages/life_pay/life_pay_page.dart b/lib/pages/life_pay/life_pay_page.dart index e9ce4ca8..5ae4ad34 100644 --- a/lib/pages/life_pay/life_pay_page.dart +++ b/lib/pages/life_pay/life_pay_page.dart @@ -1,5 +1,6 @@ import 'package:aku_community/pages/life_pay/pay_util.dart'; import 'package:aku_community/utils/network/base_model.dart'; +import 'package:aku_community/widget/others/house_head_card.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -17,7 +18,6 @@ import 'package:aku_community/pages/life_pay/pay_finish_page.dart'; import 'package:aku_community/pages/life_pay/widget/life_pay_detail_page.dart'; import 'package:aku_community/pages/things_page/widget/bee_list_view.dart'; import 'package:aku_community/provider/app_provider.dart'; -import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; import 'package:aku_community/utils/bee_parse.dart'; import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/network/net_util.dart'; @@ -65,64 +65,6 @@ class _LifePayPageState extends State { super.dispose(); } - Widget _buildHouseCard() { - AppProvider appProvider = Provider.of(context); - return Material( - color: kForeGroundColor, - child: Padding( - padding: EdgeInsets.all(32.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - '当前房屋'.text.black.size(28.sp).make(), - 32.w.heightBox, - GestureDetector( - onTap: () { - Get.to(() => PickMyHousePage()); - _controller!.callRefresh(); - }, - child: Row( - children: [ - Image.asset( - R.ASSETS_ICONS_HOUSE_PNG, - width: 60.w, - height: 60.w, - ), - 40.w.widthBox, - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - S - .of(context)! - .tempPlotName - .text - .black - .size(32.sp) - .bold - .make(), - 10.w.heightBox, - appProvider.selectedHouse!.roomName.text.black - .size(32.sp) - .bold - .make() - ], - ), - ), - Icon( - CupertinoIcons.chevron_forward, - size: 40.w, - ), - ], - ).material(color: Colors.transparent), - ), - 24.w.heightBox, - ], - ), - ), - ); - } - Widget _buildCard(LifePayModel model, int index) { return Container( padding: EdgeInsets.symmetric(vertical: 20.w), @@ -359,7 +301,7 @@ class _LifePayPageState extends State { if (items != null) _models = items as List; return Column( children: [ - _buildHouseCard(), + HouseHeadCard( controller: _controller, context: context), 16.w.heightBox, Container( padding: EdgeInsets.all(32.w), @@ -440,3 +382,5 @@ class _LifePayPageState extends State { ); } } + + diff --git a/lib/ui/profile/house/house_information_check_page.dart b/lib/ui/profile/house/house_information_check_page.dart new file mode 100644 index 00000000..bed52734 --- /dev/null +++ b/lib/ui/profile/house/house_information_check_page.dart @@ -0,0 +1,105 @@ +import 'package:aku_community/base/base_style.dart'; +import 'package:aku_community/const/resource.dart'; +import 'package:aku_community/utils/headers.dart'; +import 'package:aku_community/widget/bee_divider.dart'; +import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:aku_community/widget/buttons/bottom_button.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class HouseInformationCheckPage extends StatefulWidget { + HouseInformationCheckPage({Key? key}) : super(key: key); + + @override + _HouseInformationCheckPageState createState() => + _HouseInformationCheckPageState(); +} + +class _HouseInformationCheckPageState extends State { + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '房屋信息核对', + bodyColor: Colors.white, + body: ListView( + padding: EdgeInsets.only(bottom: 24.w, left: 32.w,right: 32.w), + children: [ + _houseHead(), + _textTile('认定人才类型', '二类人才'), + _textTile('房屋户型', 'B座C1户型'), + _textTile('房屋结构', '两房两卫一厅'), + _textTile('建筑面积', '90平米'), + _textTile('使用面积', '78平米'), + _textTile('租赁期限', '2020-10-26 ———— 2023-10-25'), + ].sepWidget(separate: 24.w.heightBox), + ), + bottomNavi: BottomButton( + onPressed: () {}, + child: '确认'.text.size(32.sp).bold.color(ktextPrimary).make(), + ), + ); + } + + Widget _textTile(String title, String content) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + title.text.size(28.sp).color(ktextPrimary).make(), + 24.w.heightBox, + content.text.size(36.sp).color(ktextPrimary).bold.make(), + 16.w.heightBox, + BeeDivider.horizontal() + ], + ); + } + + Widget _houseHead() { + return Material( + color: kForeGroundColor, + child: Padding( + padding: EdgeInsets.all(32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + '当前房屋'.text.black.size(28.sp).make(), + 32.w.heightBox, + Row( + children: [ + Image.asset( + R.ASSETS_ICONS_HOUSE_PNG, + width: 60.w, + height: 60.w, + ), + 40.w.widthBox, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + S + .of(context)! + .tempPlotName + .text + .black + .size(32.sp) + .bold + .make(), + 10.w.heightBox, + 'appProvider.selectedHouse!' + .text + .black + .size(32.sp) + .bold + .make() + ], + ), + ), + ], + ).material(color: Colors.transparent), + 24.w.heightBox, + ], + ), + ), + ); + } +} diff --git a/lib/ui/profile/house/supplement_information_page.dart b/lib/ui/profile/house/supplement_information_page.dart index 866a710d..d8729189 100644 --- a/lib/ui/profile/house/supplement_information_page.dart +++ b/lib/ui/profile/house/supplement_information_page.dart @@ -1,4 +1,5 @@ import 'package:aku_community/base/base_style.dart'; +import 'package:aku_community/ui/profile/house/house_information_check_page.dart'; import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/buttons/bottom_button.dart'; import 'package:aku_community/widget/others/bee_input_row.dart'; @@ -88,7 +89,9 @@ class _SupplementInformationPageState extends State { ].sepWidget(separate: 24.w.heightBox), ), bottomNavi: BottomButton( - onPressed: () {}, + onPressed: () { + Get.to(() => HouseInformationCheckPage()); + }, child: '下一步'.text.size(32.sp).bold.color(ktextPrimary).make()), ); } diff --git a/lib/widget/others/house_head_card.dart b/lib/widget/others/house_head_card.dart new file mode 100644 index 00000000..6e92738e --- /dev/null +++ b/lib/widget/others/house_head_card.dart @@ -0,0 +1,82 @@ +import 'package:aku_community/base/base_style.dart'; +import 'package:aku_community/const/resource.dart'; +import 'package:aku_community/provider/app_provider.dart'; +import 'package:aku_community/ui/profile/house/pick_my_house_page.dart'; +import 'package:aku_community/utils/headers.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:get/get.dart'; +import 'package:provider/provider.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:velocity_x/velocity_x.dart'; + +class HouseHeadCard extends StatelessWidget { + const HouseHeadCard({ + Key? key, + required this.context, + required EasyRefreshController? controller, + }) : controller = controller, super(key: key); + + final BuildContext context; + final EasyRefreshController? controller; + + @override + Widget build(BuildContext context) { + AppProvider appProvider = Provider.of(context); + return Material( + color: kForeGroundColor, + child: Padding( + padding: EdgeInsets.all(32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + '当前房屋'.text.black.size(28.sp).make(), + 32.w.heightBox, + GestureDetector( + onTap: () { + Get.to(() => PickMyHousePage()); + controller!.callRefresh(); + }, + child: Row( + children: [ + Image.asset( + R.ASSETS_ICONS_HOUSE_PNG, + width: 60.w, + height: 60.w, + ), + 40.w.widthBox, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + S + .of(context)! + .tempPlotName + .text + .black + .size(32.sp) + .bold + .make(), + 10.w.heightBox, + appProvider.selectedHouse!.roomName.text.black + .size(32.sp) + .bold + .make() + ], + ), + ), + Icon( + CupertinoIcons.chevron_forward, + size: 40.w, + ), + ], + ).material(color: Colors.transparent), + ), + 24.w.heightBox, + ], + ), + ), + ); + } +} \ No newline at end of file