修复房屋选择问题,修复选择搬家公司默认为自己搬运,优化点击区域

hmxc
张萌 4 years ago
parent b943160ba0
commit 416e9c96fb

@ -54,7 +54,7 @@ class _DetoCreatePageState extends State<DetoCreatePage> {
'50kg-100kg', '50kg-100kg',
'> 100kg', '> 100kg',
]; ];
int _selectApproach; int _selectApproach=0;
List<String> _listMode = [ List<String> _listMode = [
'自己搬运', '自己搬运',
'搬家公司', '搬家公司',

@ -31,7 +31,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
bool _onloading = true; bool _onloading = true;
String get result { String get result {
if (_selected == _companyModel.appMovingCompanyVoList.length) { if (_selected == _companyModel.appMovingCompanyVoList.length) {
return null; return '已选择自己联系';
} else { } else {
return _companyModel.appMovingCompanyVoList[_selected].tel; return _companyModel.appMovingCompanyVoList[_selected].tel;
} }
@ -92,7 +92,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
], ],
).expand(), ).expand(),
], ],
), ).material(color: Colors.transparent),
), ),
); );
} }
@ -104,6 +104,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
setState(() {}); setState(() {});
}, },
child: Container( child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 28.w), padding: EdgeInsets.symmetric(vertical: 28.w),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -119,7 +120,7 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
'自己联系'.text.color(ktextPrimary).size(28.sp).bold.make() '自己联系'.text.color(ktextPrimary).size(28.sp).bold.make()
], ],
), ),
), ).material(color: Colors.transparent),
); );
} }

@ -49,8 +49,9 @@ Widget _unPaidTag() {
class _MyHousePageState extends State<MyHousePage> { class _MyHousePageState extends State<MyHousePage> {
int _select; int _select;
List<EstatePaymentModel> _list; List<EstatePaymentModel> _list = [];
List<EstatePaymentModel> get _unPaidList => _list.where((element) => element.status == 1).toList(); List<EstatePaymentModel> get _unPaidList =>
_list.where((element) => element.status == 1).toList();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -59,7 +60,6 @@ class _MyHousePageState extends State<MyHousePage> {
_list = value.data; _list = value.data;
return _list; return _list;
}); });
} }
} }
@ -67,41 +67,41 @@ class _MyHousePageState extends State<MyHousePage> {
{bool paid = false}) { {bool paid = false}) {
return Container( return Container(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: Row( child: GestureDetector(
children: [ onTap: () {
GestureDetector( _select = index;
onTap: () { setState(() {});
_select = index; },
setState(() {}); child: Row(
}, children: [
child: CommonRadio( CommonRadio(
value: index, value: index,
groupValue: _select, groupValue: _select,
size: 32.w, size: 32.w,
), ),
), 24.w.widthBox,
24.w.widthBox, Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: [
children: [ kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(),
kEstateName.text.size(24.sp).color(ktextSubColor).bold.make(), 16.w.heightBox,
16.w.heightBox, BeeParse.getEstateName(estateName)
BeeParse.getEstateName(estateName) .text
.text .color(ktextPrimary)
.color(ktextPrimary) .size(28.sp)
.size(28.sp) .bold
.bold .make(),
.make(), ],
], ),
), Spacer(),
Spacer(), currentHouse == estateName
currentHouse == estateName ? _currentHouseTag()
? _currentHouseTag() : paid
: paid ? _unPaidTag()
? _unPaidTag() : SizedBox()
: SizedBox() ],
], ).material(color: Colors.transparent),
), ),
); );
} }

Loading…
Cancel
Save