|
|
@ -20,11 +20,12 @@ class DistributionMode extends StatefulWidget { |
|
|
|
String promotionId, |
|
|
|
String promotionId, |
|
|
|
) queryOrderInfo; |
|
|
|
) queryOrderInfo; |
|
|
|
final Function(int selectedBtn) queryAddress; |
|
|
|
final Function(int selectedBtn) queryAddress; |
|
|
|
|
|
|
|
final Function(String addId) selectedNewAddress; |
|
|
|
final StoreInfo storeInfo; |
|
|
|
final StoreInfo storeInfo; |
|
|
|
final Address address; |
|
|
|
final Address address; |
|
|
|
|
|
|
|
|
|
|
|
DistributionMode( |
|
|
|
DistributionMode(this.queryOrderInfo, this.queryAddress, this.storeInfo, |
|
|
|
this.queryOrderInfo, this.queryAddress, this.storeInfo, this.address); |
|
|
|
this.address, this.selectedNewAddress); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
State<StatefulWidget> createState() { |
|
|
|
State<StatefulWidget> createState() { |
|
|
@ -86,7 +87,7 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
height: 143.h, |
|
|
|
height: 150.h, |
|
|
|
margin: EdgeInsets.only( |
|
|
|
margin: EdgeInsets.only( |
|
|
|
left: 16, |
|
|
|
left: 16, |
|
|
|
right: 16, |
|
|
|
right: 16, |
|
|
@ -126,10 +127,13 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
flex: 1, |
|
|
|
flex: 1, |
|
|
|
child: GestureDetector( |
|
|
|
child: GestureDetector( |
|
|
|
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
selectedBtn = 0; |
|
|
|
selectedBtn = 0; |
|
|
|
widget.queryOrderInfo( |
|
|
|
widget.queryOrderInfo( |
|
|
|
null, selectedBtn, null, 0, null); |
|
|
|
null, selectedBtn, null, 0, null); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
height: 50.h, |
|
|
|
height: 50.h, |
|
|
@ -149,8 +153,10 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
flex: 1, |
|
|
|
flex: 1, |
|
|
|
child: GestureDetector( |
|
|
|
child: GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
selectedBtn = 1; |
|
|
|
selectedBtn = 1; |
|
|
|
widget.queryAddress(selectedBtn); |
|
|
|
widget.queryAddress(selectedBtn); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
height: 50.h, |
|
|
|
height: 50.h, |
|
|
@ -252,7 +258,7 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
Column( |
|
|
|
Column( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
RoundButton( |
|
|
|
RoundButton( |
|
|
|
width: 41.w, |
|
|
|
// width: 41.w, |
|
|
|
height: 13, |
|
|
|
height: 13, |
|
|
|
text: distance.length > 3 |
|
|
|
text: distance.length > 3 |
|
|
|
? "${distance}km" |
|
|
|
? "${distance}km" |
|
|
@ -280,10 +286,22 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
: Container( |
|
|
|
: GestureDetector( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
|
|
|
'/router/manage_address_page', |
|
|
|
|
|
|
|
arguments: {"isSelector": true}).then((value) { |
|
|
|
|
|
|
|
widget.selectedNewAddress((value as Map)["id"]); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, top: 15), |
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, top: 15), |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
@ -295,7 +313,7 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
width: 24.w, |
|
|
|
width: 24.w, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
"张先生", |
|
|
|
widget?.address?.username ?? "", |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 15.sp, |
|
|
|
fontSize: 15.sp, |
|
|
@ -308,7 +326,7 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"12309090909", |
|
|
|
widget?.address?.phone ?? "", |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
maxLines: 2, |
|
|
|
maxLines: 2, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
@ -321,21 +339,31 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
Navigator.of(context).popAndPushNamed( |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
'/router/manage_address_page'); |
|
|
|
'/router/manage_address_page', |
|
|
|
|
|
|
|
arguments: { |
|
|
|
|
|
|
|
"isSelector": true |
|
|
|
|
|
|
|
}).then((value) { |
|
|
|
|
|
|
|
widget.selectedNewAddress( |
|
|
|
|
|
|
|
(value as Map)["id"]); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
padding:EdgeInsets.symmetric(horizontal:15.w,vertical: 5.h), |
|
|
|
child: Icon( |
|
|
|
child: Icon( |
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
size: 24, |
|
|
|
size: 24, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Padding( |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.only(top: 4, left: 25), |
|
|
|
padding: EdgeInsets.only(top: 4, left: 25), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"武昌区中国铁建凯德1818蓝调步行街中北路109附33门牌号05", |
|
|
|
(widget?.address?.city ?? "") + |
|
|
|
|
|
|
|
(widget?.address?.area ?? "") + |
|
|
|
|
|
|
|
(widget?.address?.address ?? ""), |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
maxLines: 2, |
|
|
|
maxLines: 2, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
@ -348,6 +376,7 @@ class _DistributionMode extends State<DistributionMode> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
) |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|