我的房屋申请记录

pull/1/head
张萌 3 years ago
parent 7c22fa8ac5
commit 0c684354bd

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -679,6 +679,9 @@ class $AssetsIconsGen {
AssetGenImage get provideAged =>
const AssetGenImage('assets/icons/provide_aged.png');
/// File path: assets/icons/record.png
AssetGenImage get record => const AssetGenImage('assets/icons/record.png');
/// File path: assets/icons/report.png
AssetGenImage get report => const AssetGenImage('assets/icons/report.png');

@ -0,0 +1,36 @@
import 'package:json_annotation/json_annotation.dart';
part 'my_house_apply_record_list_model.g.dart';
@JsonSerializable()
class MyHouseApplyRecordListModel {
final int id;
final String addressName;
final String communityName;
final String buildingName;
final String unitName;
final String estateName;
final String manageEstateTypeName;
final int identity;
final String name;
final String tel;
final int status;
final String remark;
factory MyHouseApplyRecordListModel.fromJson(Map<String, dynamic> json) =>
_$MyHouseApplyRecordListModelFromJson(json);
const MyHouseApplyRecordListModel({
required this.id,
required this.addressName,
required this.communityName,
required this.buildingName,
required this.unitName,
required this.estateName,
required this.manageEstateTypeName,
required this.identity,
required this.name,
required this.tel,
required this.status,
required this.remark,
});
}

@ -0,0 +1,24 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'my_house_apply_record_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
MyHouseApplyRecordListModel _$MyHouseApplyRecordListModelFromJson(
Map<String, dynamic> json) =>
MyHouseApplyRecordListModel(
id: json['id'] as int,
addressName: json['addressName'] as String,
communityName: json['communityName'] as String,
buildingName: json['buildingName'] as String,
unitName: json['unitName'] as String,
estateName: json['estateName'] as String,
manageEstateTypeName: json['manageEstateTypeName'] as String,
identity: json['identity'] as int,
name: json['name'] as String,
tel: json['tel'] as String,
status: json['status'] as int,
remark: json['remark'] as String,
);

@ -0,0 +1,88 @@
import 'package:aku_new_community/models/sars_model/my_house/my_house_apply_record_list_model.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/tag/bee_tag.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class ApplyRecordPage extends StatefulWidget {
const ApplyRecordPage({Key? key}) : super(key: key);
@override
_ApplyRecordPageState createState() => _ApplyRecordPageState();
}
class _ApplyRecordPageState extends State<ApplyRecordPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '我的房屋申请',
body: SafeArea(
child: EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
footer: MaterialFooter(),
onRefresh: () async {},
onLoad: () async {},
child: ListView(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
children: [],
),
)),
);
}
Widget _houseCard(MyHouseApplyRecordListModel model) {
return Stack(
children: [
Container(
width: 686.w,
padding: EdgeInsets.all(24.w),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(8.w)),
child: Column(
children: [
Row(
children: [
'${model.addressName} ${model.communityName}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
8.w.heightBox,
Row(
children: [
'${model.buildingName}${model.unitName}${model.estateName}'
.text
.size(36.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
24.w.widthBox,
BeeTag.yellowSolid(text: '${model.manageEstateTypeName}')
],
),
24.w.heightBox,
BeeDivider.horizontal(),
24.w.heightBox,
Row(
children: [
BeeTag.yellowHollow(text: '${model.manageEstateTypeName}'),
10.w.widthBox,
'${model.name} ${model.tel}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
)
],
),
),
],
);
}
}

@ -26,13 +26,22 @@ class _MyHousePageState extends State<MyHousePage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '我的房屋',
actions: [
IconButton(
onPressed: () {},
icon: Assets.icons.record.image(width: 40.w, height: 40.w))
],
body: SafeArea(
child: UserTool.userProvider.myHouses.isEmpty
? _emptyWidget()
: ListView(
padding:
EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
children: <Widget>[].sepWidget(separate: 24.w.heightBox),
children: <Widget>[
...UserTool.userProvider.myHouses
.map((e) => _houseCard(e))
.toList()
].sepWidget(separate: 24.w.heightBox),
)),
bottomNavi: Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),

Loading…
Cancel
Save