|
|
|
@ -177,175 +177,175 @@ class _StoreInfos extends State<StoreInfos> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
return AspectRatio( |
|
|
|
|
aspectRatio: 1, |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(16, 20, 16, 8), |
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 20, 10, 14), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.circular(8), |
|
|
|
|
boxShadow: [ |
|
|
|
|
BoxShadow( |
|
|
|
|
color: Colors.black.withAlpha(25), |
|
|
|
|
offset: Offset(0, 1), |
|
|
|
|
blurRadius: 12, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
AspectRatio( |
|
|
|
|
aspectRatio: 1.8, |
|
|
|
|
child: buildSwiper(), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
left: 10.w, |
|
|
|
|
right: 10.w, |
|
|
|
|
top: 16.h, |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: |
|
|
|
|
MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
alignment: |
|
|
|
|
Alignment.centerLeft, |
|
|
|
|
child: Text( |
|
|
|
|
widget.storeInfo != null |
|
|
|
|
? widget.storeInfo.storeName |
|
|
|
|
: "", |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).ren( |
|
|
|
|
widget.storeInfo != null |
|
|
|
|
? widget.storeInfo |
|
|
|
|
.perCapitaConsumption |
|
|
|
|
: "", |
|
|
|
|
), |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
widget.storeInfo != null |
|
|
|
|
? widget.storeInfo.address |
|
|
|
|
: "", |
|
|
|
|
maxLines: 2, |
|
|
|
|
textAlign: TextAlign.justify, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
children: itemServer( |
|
|
|
|
widget.storeInfo != null |
|
|
|
|
? widget.storeInfo.businessService |
|
|
|
|
: "", |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).yingyeshijian(widget.storeInfo == |
|
|
|
|
null |
|
|
|
|
? "" |
|
|
|
|
: (widget.storeInfo.openStartTime == |
|
|
|
|
null && |
|
|
|
|
widget.storeInfo |
|
|
|
|
.openEndTime == |
|
|
|
|
null) |
|
|
|
|
? S.of(context).quantian |
|
|
|
|
: "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} " |
|
|
|
|
"- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"), |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
if (widget.storeInfo == null || |
|
|
|
|
widget.storeInfo.latitude == |
|
|
|
|
null || |
|
|
|
|
widget.storeInfo.longitude == |
|
|
|
|
null || |
|
|
|
|
widget.storeInfo.latitude == "" || |
|
|
|
|
widget.storeInfo.longitude == "") |
|
|
|
|
return; |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/location_map', |
|
|
|
|
arguments: { |
|
|
|
|
"lat": widget.storeInfo.latitude, |
|
|
|
|
"lng": |
|
|
|
|
widget.storeInfo.longitude, |
|
|
|
|
"storeName": |
|
|
|
|
widget.storeInfo.storeName, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_location.png", |
|
|
|
|
width: 24.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 16.w, |
|
|
|
|
), |
|
|
|
|
InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
showCallMobile(); |
|
|
|
|
}, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_union_call.png", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
// return AspectRatio( |
|
|
|
|
// aspectRatio: 1, |
|
|
|
|
// child: Container( |
|
|
|
|
// margin: EdgeInsets.fromLTRB(16, 20, 16, 8), |
|
|
|
|
// padding: EdgeInsets.fromLTRB(10, 20, 10, 14), |
|
|
|
|
// decoration: BoxDecoration( |
|
|
|
|
// color: Colors.white, |
|
|
|
|
// borderRadius: BorderRadius.circular(8), |
|
|
|
|
// boxShadow: [ |
|
|
|
|
// BoxShadow( |
|
|
|
|
// color: Colors.black.withAlpha(25), |
|
|
|
|
// offset: Offset(0, 1), |
|
|
|
|
// blurRadius: 12, |
|
|
|
|
// spreadRadius: 0, |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// child: Column( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
// children: [ |
|
|
|
|
// AspectRatio( |
|
|
|
|
// aspectRatio: 1.8, |
|
|
|
|
// child: buildSwiper(), |
|
|
|
|
// ), |
|
|
|
|
// Expanded( |
|
|
|
|
// child: Container( |
|
|
|
|
// margin: EdgeInsets.only( |
|
|
|
|
// left: 10.w, |
|
|
|
|
// right: 10.w, |
|
|
|
|
// top: 16.h, |
|
|
|
|
// ), |
|
|
|
|
// child: Column( |
|
|
|
|
// mainAxisAlignment: |
|
|
|
|
// MainAxisAlignment.spaceBetween, |
|
|
|
|
// crossAxisAlignment: |
|
|
|
|
// CrossAxisAlignment.start, |
|
|
|
|
// children: [ |
|
|
|
|
// Row( |
|
|
|
|
// children: [ |
|
|
|
|
// Expanded( |
|
|
|
|
// child: Container( |
|
|
|
|
// alignment: |
|
|
|
|
// Alignment.centerLeft, |
|
|
|
|
// child: Text( |
|
|
|
|
// widget.storeInfo != null |
|
|
|
|
// ? widget.storeInfo.storeName |
|
|
|
|
// : "", |
|
|
|
|
// overflow: TextOverflow.ellipsis, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 16.sp, |
|
|
|
|
// color: Colors.black, |
|
|
|
|
// fontWeight: MyFontWeight.medium, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// Text( |
|
|
|
|
// S.of(context).ren( |
|
|
|
|
// widget.storeInfo != null |
|
|
|
|
// ? widget.storeInfo |
|
|
|
|
// .perCapitaConsumption |
|
|
|
|
// : "", |
|
|
|
|
// ), |
|
|
|
|
// overflow: TextOverflow.ellipsis, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 14.sp, |
|
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
|
// color: Color(0xFF353535), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// Text( |
|
|
|
|
// widget.storeInfo != null |
|
|
|
|
// ? widget.storeInfo.address |
|
|
|
|
// : "", |
|
|
|
|
// maxLines: 2, |
|
|
|
|
// textAlign: TextAlign.justify, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// color: Color(0xFF353535), |
|
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
|
// fontSize: 12.sp, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// Row( |
|
|
|
|
// children: itemServer( |
|
|
|
|
// widget.storeInfo != null |
|
|
|
|
// ? widget.storeInfo.businessService |
|
|
|
|
// : "", |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// Row( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.end, |
|
|
|
|
// children: [ |
|
|
|
|
// Expanded( |
|
|
|
|
// child: Text( |
|
|
|
|
// S.of(context).yingyeshijian(widget.storeInfo == |
|
|
|
|
// null |
|
|
|
|
// ? "" |
|
|
|
|
// : (widget.storeInfo.openStartTime == |
|
|
|
|
// null && |
|
|
|
|
// widget.storeInfo |
|
|
|
|
// .openEndTime == |
|
|
|
|
// null) |
|
|
|
|
// ? S.of(context).quantian |
|
|
|
|
// : "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} " |
|
|
|
|
// "- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"), |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// color: Color(0xFF353535), |
|
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
|
// fontSize: 12.sp, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// width: 16.w, |
|
|
|
|
// ), |
|
|
|
|
// InkWell( |
|
|
|
|
// onTap: () { |
|
|
|
|
// if (widget.storeInfo == null || |
|
|
|
|
// widget.storeInfo.latitude == |
|
|
|
|
// null || |
|
|
|
|
// widget.storeInfo.longitude == |
|
|
|
|
// null || |
|
|
|
|
// widget.storeInfo.latitude == "" || |
|
|
|
|
// widget.storeInfo.longitude == "") |
|
|
|
|
// return; |
|
|
|
|
// Navigator.of(context).pushNamed( |
|
|
|
|
// '/router/location_map', |
|
|
|
|
// arguments: { |
|
|
|
|
// "lat": widget.storeInfo.latitude, |
|
|
|
|
// "lng": |
|
|
|
|
// widget.storeInfo.longitude, |
|
|
|
|
// "storeName": |
|
|
|
|
// widget.storeInfo.storeName, |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
// child: Image.asset( |
|
|
|
|
// "assets/image/icon_union_location.png", |
|
|
|
|
// width: 24.w, |
|
|
|
|
// height: 24.h, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// width: 16.w, |
|
|
|
|
// ), |
|
|
|
|
// InkWell( |
|
|
|
|
// onTap: () { |
|
|
|
|
// showCallMobile(); |
|
|
|
|
// }, |
|
|
|
|
// child: Image.asset( |
|
|
|
|
// "assets/image/icon_union_call.png", |
|
|
|
|
// width: 24, |
|
|
|
|
// height: 24, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// flex: 1, |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget buildSwiper() { |
|
|
|
|