|
|
@ -1,8 +1,6 @@
|
|
|
|
import 'package:akuCommunity/model/user/house_model.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/provider/app_provider.dart';
|
|
|
|
import 'package:akuCommunity/provider/app_provider.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/house_card.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/house_card.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/house_func.dart';
|
|
|
|
import 'package:akuCommunity/ui/profile/house/house_func.dart';
|
|
|
|
import 'package:akuCommunity/utils/network/base_model.dart';
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
@ -10,9 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:akuCommunity/const/resource.dart';
|
|
|
|
import 'package:akuCommunity/const/resource.dart';
|
|
|
|
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/net_util.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:akuCommunity/widget/bee_scaffold.dart';
|
|
|
|
import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
import 'package:akuCommunity/utils/headers.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
@ -32,6 +28,12 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
|
|
|
|
return appProvider.houses.isEmpty;
|
|
|
|
return appProvider.houses.isEmpty;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///存在已认证的房屋
|
|
|
|
|
|
|
|
bool get _haveAuthedHouse {
|
|
|
|
|
|
|
|
final appProvider = Provider.of<AppProvider>(context, listen: false);
|
|
|
|
|
|
|
|
return (appProvider?.selectedHouse?.status ?? 0) == 4;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final appProvider = Provider.of<AppProvider>(context);
|
|
|
|
final appProvider = Provider.of<AppProvider>(context);
|
|
|
@ -56,17 +58,20 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
|
|
|
|
? 280.hb
|
|
|
|
? 280.hb
|
|
|
|
: Padding(
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
child: HouseCard.fail(
|
|
|
|
child: HouseCard(
|
|
|
|
plotName: '人才公寓智慧小区',
|
|
|
|
type: appProvider.selectedHouse.reviewed
|
|
|
|
houseName: appProvider.selectedHouse.roomName,
|
|
|
|
? CardAuthType.SUCCESS
|
|
|
|
role: 1,
|
|
|
|
: CardAuthType.FAIL,
|
|
|
|
|
|
|
|
model: appProvider.selectedHouse,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (!_emptyHouse) 88.hb,
|
|
|
|
if (!_emptyHouse) 88.hb,
|
|
|
|
|
|
|
|
if (!_haveAuthedHouse)
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 75.w),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 75.w),
|
|
|
|
child: Image.asset(R.ASSETS_STATIC_REVIEWING_WEBP),
|
|
|
|
child: Image.asset(R.ASSETS_STATIC_REVIEWING_WEBP),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
if (!_haveAuthedHouse)
|
|
|
|
Center(
|
|
|
|
Center(
|
|
|
|
child: ElevatedButton(
|
|
|
|
child: ElevatedButton(
|
|
|
|
onPressed: _addHouse,
|
|
|
|
onPressed: _addHouse,
|
|
|
|