|
|
@ -1,7 +1,11 @@
|
|
|
|
|
|
|
|
import 'package:akuCommunity/constants/api.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/add_house_page.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/add_house_page.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/utils/network/base_list_model.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/utils/network/net_util.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:akuCommunity/const/resource.dart';
|
|
|
|
import 'package:akuCommunity/const/resource.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';
|
|
|
|
|
|
|
|
|
|
|
@ -13,22 +17,37 @@ class HouseOwnersPage extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _HouseOwnersPageState extends State<HouseOwnersPage> {
|
|
|
|
class _HouseOwnersPageState extends State<HouseOwnersPage> {
|
|
|
|
|
|
|
|
EasyRefreshController _refreshController = EasyRefreshController();
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
final media = MediaQuery.of(context);
|
|
|
|
return BeeScaffold(
|
|
|
|
return BeeScaffold(
|
|
|
|
title: '我的房屋',
|
|
|
|
title: '我的房屋',
|
|
|
|
body: Column(
|
|
|
|
actions: [],
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
body: EasyRefresh(
|
|
|
|
children: [
|
|
|
|
header: MaterialHeader(),
|
|
|
|
Padding(
|
|
|
|
controller: _refreshController,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 75.w),
|
|
|
|
firstRefresh: true,
|
|
|
|
child: Image.asset(R.ASSETS_STATIC_REVIEWING_WEBP),
|
|
|
|
onRefresh: () async {
|
|
|
|
),
|
|
|
|
await _getFirstHouse();
|
|
|
|
ElevatedButton(
|
|
|
|
},
|
|
|
|
onPressed: _addHouse,
|
|
|
|
child: SizedBox(
|
|
|
|
child: Text('添加房屋'),
|
|
|
|
height: media.size.height - media.padding.top - 56,
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 75.w),
|
|
|
|
|
|
|
|
child: Image.asset(R.ASSETS_STATIC_REVIEWING_WEBP),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
ElevatedButton(
|
|
|
|
|
|
|
|
onPressed: _addHouse,
|
|
|
|
|
|
|
|
child: Text('添加房屋'),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -36,4 +55,12 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
|
|
|
|
_addHouse() async {
|
|
|
|
_addHouse() async {
|
|
|
|
await Get.to(() => AddHousePage());
|
|
|
|
await Get.to(() => AddHousePage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future _getFirstHouse() async {
|
|
|
|
|
|
|
|
BaseListModel model = await NetUtil().getList(
|
|
|
|
|
|
|
|
API.user.houseList,
|
|
|
|
|
|
|
|
params: {'pageNum': 1, 'size': 1},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
print(model.tableList);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|