|
|
@ -11,6 +11,7 @@ import 'package:aku_new_community/widget/dialog/certification_dialog.dart';
|
|
|
|
import 'package:aku_new_community/widget/others/user_tool.dart';
|
|
|
|
import 'package:aku_new_community/widget/others/user_tool.dart';
|
|
|
|
import 'package:aku_new_community/widget/tag/bee_tag.dart';
|
|
|
|
import 'package:aku_new_community/widget/tag/bee_tag.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
@ -23,15 +24,19 @@ class MyHousePage extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
|
|
|
|
EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
Future.delayed(Duration(milliseconds: 0), () async {
|
|
|
|
|
|
|
|
await UserTool.userProvider.updateMyHouseInfo();
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
_refreshController.dispose();
|
|
|
|
|
|
|
|
super.dispose();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BeeScaffold(
|
|
|
|
return BeeScaffold(
|
|
|
@ -46,14 +51,23 @@ class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
body: SafeArea(
|
|
|
|
body: SafeArea(
|
|
|
|
child: UserTool.userProvider.myHouses.isEmpty
|
|
|
|
child: UserTool.userProvider.myHouses.isEmpty
|
|
|
|
? HouseEmptyWidget()
|
|
|
|
? HouseEmptyWidget()
|
|
|
|
: ListView(
|
|
|
|
: EasyRefresh(
|
|
|
|
padding:
|
|
|
|
controller: _refreshController,
|
|
|
|
EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
|
|
|
|
firstRefresh: true,
|
|
|
|
children: <Widget>[
|
|
|
|
header: MaterialHeader(),
|
|
|
|
...UserTool.userProvider.myHouses
|
|
|
|
onRefresh: () async {
|
|
|
|
.map((e) => _houseCard(e))
|
|
|
|
await UserTool.userProvider.updateMyHouseInfo();
|
|
|
|
.toList()
|
|
|
|
setState(() {});
|
|
|
|
].sepWidget(separate: 24.w.heightBox),
|
|
|
|
},
|
|
|
|
|
|
|
|
child: ListView(
|
|
|
|
|
|
|
|
padding:
|
|
|
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
...UserTool.userProvider.myHouses
|
|
|
|
|
|
|
|
.map((e) => _houseCard(e))
|
|
|
|
|
|
|
|
.toList()
|
|
|
|
|
|
|
|
].sepWidget(separate: 24.w.heightBox),
|
|
|
|
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
bottomNavi: Padding(
|
|
|
|
bottomNavi: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
|
|
@ -74,57 +88,63 @@ class _MyHousePageState extends State<MyHousePage> {
|
|
|
|
Widget _houseCard(MyHouseModel model) {
|
|
|
|
Widget _houseCard(MyHouseModel model) {
|
|
|
|
return Stack(
|
|
|
|
return Stack(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
GestureDetector(
|
|
|
|
width: 686.w,
|
|
|
|
onTap: () {},
|
|
|
|
padding: EdgeInsets.all(24.w),
|
|
|
|
child: Material(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
child: Container(
|
|
|
|
color: Colors.white, borderRadius: BorderRadius.circular(8.w)),
|
|
|
|
width: 686.w,
|
|
|
|
child: Column(
|
|
|
|
padding: EdgeInsets.all(24.w),
|
|
|
|
children: [
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
Row(
|
|
|
|
color: Colors.white,
|
|
|
|
children: [
|
|
|
|
borderRadius: BorderRadius.circular(8.w)),
|
|
|
|
'${model.addressName} ${model.communityName}'
|
|
|
|
child: Column(
|
|
|
|
.text
|
|
|
|
|
|
|
|
.size(24.sp)
|
|
|
|
|
|
|
|
.color(Colors.black.withOpacity(0.65))
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
8.w.heightBox,
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
'${model.buildingName}${model.unitName}${model.estateName}'
|
|
|
|
Row(
|
|
|
|
.text
|
|
|
|
children: [
|
|
|
|
.size(36.sp)
|
|
|
|
'${model.addressName} ${model.communityName}'
|
|
|
|
.color(Colors.black.withOpacity(0.85))
|
|
|
|
.text
|
|
|
|
.make(),
|
|
|
|
.size(24.sp)
|
|
|
|
24.w.widthBox,
|
|
|
|
.color(Colors.black.withOpacity(0.65))
|
|
|
|
model.isDefault == 1
|
|
|
|
.make(),
|
|
|
|
? BeeTag.yellowSolid(
|
|
|
|
],
|
|
|
|
text: '${model.manageEstateTypeName}')
|
|
|
|
),
|
|
|
|
: BeeTag.blackSolid(
|
|
|
|
8.w.heightBox,
|
|
|
|
text: '${model.manageEstateTypeName}'),
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
'${model.buildingName}${model.unitName}${model.estateName}'
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.size(36.sp)
|
|
|
|
|
|
|
|
.color(Colors.black.withOpacity(0.85))
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
24.w.widthBox,
|
|
|
|
|
|
|
|
model.isDefault == 1
|
|
|
|
|
|
|
|
? BeeTag.yellowSolid(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}')
|
|
|
|
|
|
|
|
: BeeTag.blackSolid(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}'),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
24.w.heightBox,
|
|
|
|
|
|
|
|
BeeDivider.horizontal(),
|
|
|
|
|
|
|
|
24.w.heightBox,
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
model.isDefault == 1
|
|
|
|
|
|
|
|
? BeeTag.yellowHollow(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}')
|
|
|
|
|
|
|
|
: BeeTag.blackHollow(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}'),
|
|
|
|
|
|
|
|
10.w.widthBox,
|
|
|
|
|
|
|
|
'${model.name} ${model.tel}'
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.size(24.sp)
|
|
|
|
|
|
|
|
.color(Colors.black.withOpacity(0.65))
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
24.w.heightBox,
|
|
|
|
),
|
|
|
|
BeeDivider.horizontal(),
|
|
|
|
|
|
|
|
24.w.heightBox,
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
model.isDefault == 1
|
|
|
|
|
|
|
|
? BeeTag.yellowHollow(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}')
|
|
|
|
|
|
|
|
: BeeTag.blackHollow(
|
|
|
|
|
|
|
|
text: '${model.manageEstateTypeName}'),
|
|
|
|
|
|
|
|
10.w.widthBox,
|
|
|
|
|
|
|
|
'${model.name} ${model.tel}'
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.size(24.sp)
|
|
|
|
|
|
|
|
.color(Colors.black.withOpacity(0.65))
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (model.isDefault == 1)
|
|
|
|
if (model.isDefault == 1)
|
|
|
|