|
|
@ -5,6 +5,7 @@ import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
import 'package:huixiang/data/store_info.dart'; |
|
|
|
import 'package:huixiang/data/store_info.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/utils/constant.dart'; |
|
|
|
import 'package:huixiang/utils/flutter_utils.dart'; |
|
|
|
import 'package:huixiang/utils/flutter_utils.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
@ -30,150 +31,128 @@ class _StoreInfoView extends State<StoreInfoView> { |
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
height: MediaQuery.of(context).size.width >= 650 ? 180.h : 166.h, |
|
|
|
|
|
|
|
padding: EdgeInsets.all(12.w), |
|
|
|
padding: EdgeInsets.all(12.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.white, |
|
|
|
borderRadius: BorderRadius.circular(8.w), |
|
|
|
borderRadius: BorderRadius.circular(8.w), |
|
|
|
), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
child: IntrinsicHeight( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
Expanded( |
|
|
|
children: [ |
|
|
|
child: Row( |
|
|
|
Expanded( |
|
|
|
children: [ |
|
|
|
child: Row( |
|
|
|
Expanded( |
|
|
|
children: [ |
|
|
|
child: Column( |
|
|
|
Expanded( |
|
|
|
children: [ |
|
|
|
child: Column( |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
Expanded(child: Container( |
|
|
|
children: [ |
|
|
|
alignment: Alignment.centerLeft, |
|
|
|
Expanded(child: Container( |
|
|
|
child: Text( |
|
|
|
alignment: Alignment.centerLeft, |
|
|
|
widget.storeInfo != null |
|
|
|
child: Text( |
|
|
|
? (widget.storeInfo!.storeName ?? "") |
|
|
|
widget.storeInfo != null |
|
|
|
: "", |
|
|
|
? (widget.storeInfo!.storeName ?? "") |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
: "", |
|
|
|
style: TextStyle( |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
fontSize: 18.sp, |
|
|
|
style: TextStyle( |
|
|
|
color: Colors.black, |
|
|
|
fontSize: 18.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
// GestureDetector( |
|
|
|
// GestureDetector( |
|
|
|
// behavior: HitTestBehavior.opaque, |
|
|
|
// behavior: HitTestBehavior.opaque, |
|
|
|
// onTap: (){ |
|
|
|
// onTap: (){ |
|
|
|
// Navigator.of(context).pushNamed('/router/store_html',arguments: {"remark":widget.storeInfo.remark}); |
|
|
|
// Navigator.of(context).pushNamed('/router/store_html',arguments: {"remark":widget.storeInfo.remark}); |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// child: Container( |
|
|
|
// child: Container( |
|
|
|
// padding: EdgeInsets.symmetric(horizontal:8.w,vertical:3.h), |
|
|
|
// padding: EdgeInsets.symmetric(horizontal:8.w,vertical:3.h), |
|
|
|
// decoration: BoxDecoration( |
|
|
|
// decoration: BoxDecoration( |
|
|
|
// borderRadius: BorderRadius.circular(2), |
|
|
|
// borderRadius: BorderRadius.circular(2), |
|
|
|
// border: Border.all( |
|
|
|
// border: Border.all( |
|
|
|
// color:Color(0xFFEDEDED), |
|
|
|
// color:Color(0xFFEDEDED), |
|
|
|
// ) |
|
|
|
// ) |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// child: Row( |
|
|
|
// child: Row( |
|
|
|
// children: [ |
|
|
|
// children: [ |
|
|
|
// Text( |
|
|
|
// Text( |
|
|
|
// "店铺详情", |
|
|
|
// "店铺详情", |
|
|
|
// style: TextStyle( |
|
|
|
// style: TextStyle( |
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
// fontSize: 12.sp, |
|
|
|
// fontSize: 12.sp, |
|
|
|
// color: Color(0xFF4C4C4C), |
|
|
|
// color: Color(0xFF4C4C4C), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// Image.asset( |
|
|
|
// Image.asset( |
|
|
|
// "assets/image/icon_right_z.webp", |
|
|
|
// "assets/image/icon_right_z.webp", |
|
|
|
// height:12.h, |
|
|
|
// height:12.h, |
|
|
|
// width:12.w, |
|
|
|
// width:12.w, |
|
|
|
// ) |
|
|
|
// ) |
|
|
|
// ], |
|
|
|
// ], |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ) |
|
|
|
// ) |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
if( widget.storeInfo?.perCapitaConsumption != null && ( widget.storeInfo?.perCapitaConsumption ?? "") != "0") |
|
|
|
|
|
|
|
Padding(padding:EdgeInsets.only(right:20.w), |
|
|
|
|
|
|
|
child: Text( |
|
|
|
|
|
|
|
S.of(context).ren(widget.storeInfo?.perCapitaConsumption ?? ""), |
|
|
|
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
),), |
|
|
|
|
|
|
|
]..addAll(itemServer(widget.storeInfo?.businessService ?? "")), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).yingyeshijian(widget.storeInfo == null |
|
|
|
|
|
|
|
? "" |
|
|
|
|
|
|
|
: ((widget.storeInfo!.openStartTime?.isEmpty ?? true) && (widget.storeInfo!.openEndTime?.isEmpty ?? true)) |
|
|
|
|
|
|
|
? 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, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
8.d, |
|
|
|
], |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
children: [ |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
if( widget.storeInfo?.perCapitaConsumption != null && ( widget.storeInfo?.perCapitaConsumption ?? "") != "0") |
|
|
|
|
|
|
|
Padding(padding:EdgeInsets.only(right:20.w), |
|
|
|
|
|
|
|
child: Text( |
|
|
|
|
|
|
|
S.of(context).ren(widget.storeInfo?.perCapitaConsumption ?? ""), |
|
|
|
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
),), |
|
|
|
|
|
|
|
]..addAll(itemServer(widget.storeInfo?.businessService ?? "")), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
8.d, |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).yingyeshijian(widget.storeInfo == null |
|
|
|
|
|
|
|
? "" |
|
|
|
|
|
|
|
: ((widget.storeInfo!.openStartTime?.isEmpty ?? true) && (widget.storeInfo!.openEndTime?.isEmpty ?? true)) |
|
|
|
|
|
|
|
? 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, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
MImage( |
|
|
|
MImage( |
|
|
|
widget.storeInfo?.logo ?? "", |
|
|
|
widget.storeInfo?.logo ?? "", |
|
|
|
width: 70, |
|
|
|
width: 70, |
|
|
|
height: 70, |
|
|
|
height: 70, |
|
|
|
fit: BoxFit.cover, |
|
|
|
fit: BoxFit.cover, |
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
GestureDetector( |
|
|
|
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
// Navigator.of(context).pushNamed( |
|
|
|
|
|
|
|
// '/router/location_map', |
|
|
|
|
|
|
|
// arguments: { |
|
|
|
|
|
|
|
// "lat": widget.storeInfo?.latitude, |
|
|
|
|
|
|
|
// "lng": widget.storeInfo?.longitude, |
|
|
|
|
|
|
|
// "storeInfo":widget.storeInfo, |
|
|
|
|
|
|
|
// "distance":widget.distance |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
// ); |
|
|
|
|
|
|
|
showMapSelect(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Colors.transparent, |
|
|
|
|
|
|
|
padding:EdgeInsets.only(right: 8.w,bottom: 8.h) , |
|
|
|
|
|
|
|
child: Image.asset( |
|
|
|
|
|
|
|
"assets/image/icon_union_location.webp", |
|
|
|
|
|
|
|
width: 20, |
|
|
|
|
|
|
|
height: 20, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
flex: 1, |
|
|
|
child: GestureDetector( |
|
|
|
), |
|
|
|
|
|
|
|
10.d, |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
// Navigator.of(context).pushNamed( |
|
|
|
// Navigator.of(context).pushNamed( |
|
|
@ -186,45 +165,71 @@ class _StoreInfoView extends State<StoreInfoView> { |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// ); |
|
|
|
// ); |
|
|
|
showMapSelect(); |
|
|
|
showMapSelect(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child:Padding( |
|
|
|
child: Container( |
|
|
|
padding: EdgeInsets.only(bottom: 8.h,), |
|
|
|
color: Colors.transparent, |
|
|
|
child: Text( |
|
|
|
padding:EdgeInsets.only(right: 8.w,bottom: 8.h) , |
|
|
|
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}", |
|
|
|
child: Image.asset( |
|
|
|
maxLines: 2, |
|
|
|
"assets/image/icon_union_location.webp", |
|
|
|
textAlign: TextAlign.justify, |
|
|
|
width: 20, |
|
|
|
style: TextStyle( |
|
|
|
height: 20, |
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
if(widget.storeInfo?.tel?.isNotEmpty ?? false) |
|
|
|
child: GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
// Navigator.of(context).pushNamed( |
|
|
|
showCallMobile(); |
|
|
|
// '/router/location_map', |
|
|
|
}, |
|
|
|
// arguments: { |
|
|
|
child: Container( |
|
|
|
// "lat": widget.storeInfo?.latitude, |
|
|
|
padding:EdgeInsets.only(left: 16.w,right: 8.w,bottom: 8.h) , |
|
|
|
// "lng": widget.storeInfo?.longitude, |
|
|
|
child: Image.asset( |
|
|
|
// "storeInfo":widget.storeInfo, |
|
|
|
"assets/image/icon_union_call.webp", |
|
|
|
// "distance":widget.distance |
|
|
|
width: 24, |
|
|
|
// }, |
|
|
|
height: 24, |
|
|
|
// ); |
|
|
|
|
|
|
|
showMapSelect(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child:Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(bottom: 8.h,), |
|
|
|
|
|
|
|
child: Text( |
|
|
|
|
|
|
|
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo!.address : ""}", |
|
|
|
|
|
|
|
maxLines: 2, |
|
|
|
|
|
|
|
textAlign: TextAlign.justify, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget.storeInfo?.tel?.isNotEmpty ?? false) |
|
|
|
], |
|
|
|
GestureDetector( |
|
|
|
), |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
Container( |
|
|
|
onTap: () { |
|
|
|
width: double.infinity, |
|
|
|
showCallMobile(); |
|
|
|
height: 1, |
|
|
|
}, |
|
|
|
color: Color(0xFFF4F5F2), |
|
|
|
child: Container( |
|
|
|
), |
|
|
|
padding:EdgeInsets.only(left: 16.w,right: 8.w,bottom: 8.h) , |
|
|
|
], |
|
|
|
child: Image.asset( |
|
|
|
|
|
|
|
"assets/image/icon_union_call.webp", |
|
|
|
|
|
|
|
width: 24, |
|
|
|
|
|
|
|
height: 24, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
height: 1, |
|
|
|
|
|
|
|
color: Color(0xFFF4F5F2), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -255,7 +260,8 @@ class _StoreInfoView extends State<StoreInfoView> { |
|
|
|
isDestructiveAction: true, |
|
|
|
isDestructiveAction: true, |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
callMobile(mobile) async { |
|
|
|
callMobile(mobile) async { |
|
|
|