|
|
@ -19,6 +19,19 @@ class SelectMoveCompanyPage extends StatefulWidget {
|
|
|
|
class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
|
|
|
|
class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
|
|
|
|
int _selected;
|
|
|
|
int _selected;
|
|
|
|
MovingCompanyModel _companyModel;
|
|
|
|
MovingCompanyModel _companyModel;
|
|
|
|
|
|
|
|
EasyRefreshController _controller;
|
|
|
|
|
|
|
|
bool _onloading = true;
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void initState() {
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
_controller = EasyRefreshController();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
_controller = EasyRefreshController();
|
|
|
|
|
|
|
|
super.dispose();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget _buildCard(int index, String name, String tel) {
|
|
|
|
Widget _buildCard(int index, String name, String tel) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
@ -94,29 +107,37 @@ class _SelectMoveCompanyPageState extends State<SelectMoveCompanyPage> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget _emptyWidget() {
|
|
|
|
|
|
|
|
return Container();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BeeScaffold(
|
|
|
|
return BeeScaffold(
|
|
|
|
title: '搬家公司',
|
|
|
|
title: '搬家公司',
|
|
|
|
body: EasyRefresh(
|
|
|
|
body: EasyRefresh(
|
|
|
|
|
|
|
|
firstRefresh: true,
|
|
|
|
|
|
|
|
controller: _controller,
|
|
|
|
onRefresh: () async {
|
|
|
|
onRefresh: () async {
|
|
|
|
_companyModel = await ManagerFunc.getMovingCompanyTel();
|
|
|
|
_companyModel = await ManagerFunc.getMovingCompanyTel();
|
|
|
|
|
|
|
|
_onloading = false;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
header: MaterialHeader(),
|
|
|
|
header: MaterialHeader(),
|
|
|
|
child: ListView(
|
|
|
|
child: _onloading
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
? _emptyWidget()
|
|
|
|
children: [
|
|
|
|
: ListView(
|
|
|
|
..._companyModel.appMovingCompanyVoList
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
.map((e) => _buildCard(
|
|
|
|
children: [
|
|
|
|
_companyModel.appMovingCompanyVoList.indexOf(e),
|
|
|
|
..._companyModel.appMovingCompanyVoList
|
|
|
|
e.name,
|
|
|
|
.map((e) => _buildCard(
|
|
|
|
e.tel))
|
|
|
|
_companyModel.appMovingCompanyVoList.indexOf(e),
|
|
|
|
.toList(),
|
|
|
|
e.name,
|
|
|
|
_buildForself(
|
|
|
|
e.tel))
|
|
|
|
_companyModel.appMovingCompanyVoList.length
|
|
|
|
.toList(),
|
|
|
|
)
|
|
|
|
_buildForself(_companyModel.appMovingCompanyVoList.length)
|
|
|
|
].sepWidget(separate: BeeDivider.horizontal()),
|
|
|
|
].sepWidget(separate: BeeDivider.horizontal()),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|