Browse Source

safety

master
fmk 3 years ago
parent
commit
97048cb27c
  1. 2
      lib/main.dart
  2. 37
      lib/retrofit/data/base_data.g.dart
  3. 41
      lib/retrofit/data/page.g.dart
  4. 1208
      lib/retrofit/retrofit_api.g.dart
  5. 221
      lib/store/store_order.dart
  6. 166
      lib/store/store_view/store_info.dart
  7. 2
      lib/union/union_details_page.dart
  8. 57
      lib/union/union_page.dart
  9. 191
      lib/union/union_view/union_coupon.dart

2
lib/main.dart

@ -52,6 +52,7 @@ import 'package:huixiang/setting/help_feedback_page.dart';
import 'package:huixiang/setting/permission_setting_page.dart';
import 'package:huixiang/setting/setting_page.dart';
import 'package:huixiang/setting/treaty_page.dart';
import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/union/location_map_page.dart';
import 'package:huixiang/web/web_page.dart';
@ -277,6 +278,7 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
'/router/location_map': (context, {arguments}) => LocationMap(arguments: arguments),
'/router/qr_scan': (context, {arguments}) => QrCodeScanPage(),
'/router/qr_share': (context, {arguments}) => QrSharePage(),
'/router/store_order': (context, {arguments}) => StoreOrderPage(arguments: arguments),
// '/router/hot_article_details_page': (context, {arguments}) => HotArticleDetailsPage(),
// '/router/ui_test': (context, {arguments}) => UITest(),
};

37
lib/retrofit/data/base_data.g.dart

@ -0,0 +1,37 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseData<T> _$BaseDataFromJson<T>(
Map<String, dynamic> json,
T Function(Object json) fromJsonT,
) {
return BaseData<T>()
..code = json['code'] as int
..data = fromJsonT(json['data'])
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
}
Map<String, dynamic> _$BaseDataToJson<T>(
BaseData<T> instance,
Object Function(T value) toJsonT,
) =>
<String, dynamic>{
'code': instance.code,
'data': toJsonT(instance.data),
'extra': instance.extra,
'isError': instance.isError,
'isSuccess': instance.isSuccess,
'msg': instance.msg,
'path': instance.path,
'timestamp': instance.timestamp,
};

41
lib/retrofit/data/page.g.dart

@ -0,0 +1,41 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'page.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PageInfo<D> _$PageInfoFromJson<D>(
Map<String, dynamic> json,
D Function(Object json) fromJsonD,
) {
return PageInfo<D>()
..pageNum = json['pageNum'] as int
..current = json['current']
..pageSize = json['pageSize'] as int
..size = json['size']
..pages = json['pages']
..hasPreviousPage = json['hasPreviousPage'] as bool
..hasNextPage = json['hasNextPage'] as bool
..total = json['total'] as String
..list = (json['list'] as List)?.map(fromJsonD)?.toList()
..records = (json['records'] as List)?.map(fromJsonD)?.toList();
}
Map<String, dynamic> _$PageInfoToJson<D>(
PageInfo<D> instance,
Object Function(D value) toJsonD,
) =>
<String, dynamic>{
'pageNum': instance.pageNum,
'current': instance.current,
'pageSize': instance.pageSize,
'size': instance.size,
'pages': instance.pages,
'hasPreviousPage': instance.hasPreviousPage,
'hasNextPage': instance.hasNextPage,
'total': instance.total,
'list': instance.list?.map(toJsonD)?.toList(),
'records': instance.records?.map(toJsonD)?.toList(),
};

1208
lib/retrofit/retrofit_api.g.dart

File diff suppressed because it is too large Load Diff

221
lib/store/store_order.dart

@ -0,0 +1,221 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/store_info.dart';
import 'package:huixiang/union/union_view/union_coupon.dart';
import 'package:huixiang/union/union_view/vip.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class StoreOrderPage extends StatefulWidget {
final Map arguments;
StoreOrderPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _StoreOrderPage();
}
}
class _StoreOrderPage extends State<StoreOrderPage>
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
TabController tabcontroller;
ApiService apiService;
StoreInfo storeInfo;
RefreshController refreshController;
@override
void initState() {
super.initState();
refreshController = RefreshController(initialRefresh: false);
queryStoreInfo();
}
queryStoreInfo() async {
final SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
);
BaseData baseData = await apiService
.queryStoreInfo(widget.arguments["id"])
.catchError((error) {
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
refreshController.refreshCompleted();
storeInfo = StoreInfo.fromJson(baseData.data);
if (mounted) {
setState(() {});
}
} else {
refreshController.refreshFailed();
}
}
@override
Widget build(BuildContext context) {
return Column(
children: [
Expanded(
child: DefaultTabController(
length: 2,
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
setState(() {});
},
child: NestedScrollView(
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
return [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
context),
sliver: SliverAppBar(
title: Text(""),
expandedHeight: 365.h,
floating: false,
snap: false,
pinned: true,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
children: [
Positioned(
child: Column(
children: [
Image.asset(
"assets/image/share_image_bg.png",
fit: BoxFit.cover,
width: MediaQuery.of(context).size.width,
height: 180.h,
),
Expanded(
child: Container(
color: Colors.transparent,
),
flex: 1,
),
],
),
top: 0,
bottom: 0,
left: 0,
right: 0,
),
Positioned(
child: Container(
child: Column(
children: [
///
StoreInfoView(),
///
if (storeInfo != null && storeInfo.couponVOList != null)
UnionCoupon(
storeInfo,
(a) {},
coupon: true,
),
///VIP信息
Vip(storeInfo, () {}, false),
],
),
),
top: 110.h,
bottom: 0,
left: 0,
right: 0,
),
],
),
collapseMode: CollapseMode.pin,
),
backgroundColor: Color(0xFFFAFAFA),
centerTitle: false,
elevation: 0,
bottom: PreferredSize(
preferredSize: Size(
MediaQuery.of(context).size.width,
38.h,
),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
width: MediaQuery.of(context).size.width,
child: TabBar(
controller: tabcontroller = TabController(
length: 2,
vsync: this,
),
automaticIndicatorColorAdjustment: true,
isScrollable: true,
indicatorWeight: 1,
indicatorColor: Color(0xFFFAFAFA),
labelPadding: EdgeInsets.only(left: 8.w, right: 8.w),
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 15.sp,
fontWeight: FontWeight.w400,
),
labelStyle: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
labelColor: Colors.black,
tabs: [
MyTab(text: "点单"),
MyTab(text: "星店活动"),
],
),
),
),
),
),
];
},
body: TabBarView(
physics: BouncingScrollPhysics(),
children: [
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
),
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width,
)
],
controller: tabcontroller,
),
),
),
),
),
Container(
height: 50.h,
color: Colors.blue,
),
],
);
}
@override
bool get wantKeepAlive => true;
}

166
lib/store/store_view/store_info.dart

@ -0,0 +1,166 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/round_button.dart';
class StoreInfoView extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _StoreInfoView();
}
}
class _StoreInfoView extends State<StoreInfoView> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
left: 16.w,
right: 16.w,
top: 5.h,
bottom: 6.h,
),
height: 138.h,
padding: EdgeInsets.all(12.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 3),
blurRadius: 3,
spreadRadius: 0,
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Row(
children: [
Expanded(
child: Column(
children: [
Container(
alignment: Alignment.centerLeft,
child: Text(
"百年川椒",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 18.sp,
color: Colors.black,
fontWeight: MyFontWeight.medium,
),
),
),
Row(
children: [
Text(
S.of(context).ren("1"),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
SizedBox(
width: 20.w,
),
]..addAll(itemServer("11,22")),
),
Text(
"地址:武昌区楚河汉界第一街区万达总部国际C座对面",
maxLines: 2,
textAlign: TextAlign.justify,
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
],
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
),
),
Image.asset(
"assets/image/icon_vip_name.png",
width: 70.w,
height: 70.w,
)
],
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
),
flex: 1,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Text(
S.of(context).yingyeshijian("10:00-22:00"),
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
),
SizedBox(
width: 16.w,
),
InkWell(
onTap: () {},
child: Image.asset(
"assets/image/icon_union_location.png",
width: 24.w,
height: 24.h,
),
),
SizedBox(
width: 16.w,
),
InkWell(
onTap: () {},
child: Image.asset(
"assets/image/icon_union_call.png",
width: 24,
height: 24,
),
),
],
),
],
),
);
}
List<Widget> itemServer(String businessService) {
if (businessService == null || businessService == "") return [];
var list = businessService.split(",");
return list
.map((e) => Container(
margin: EdgeInsets.only(right: 8.w),
child: RoundButton(
height: 14.h * AppUtils.textScale(context),
text: "$e",
backgroup: Color(0xFFFF7A1A),
padding: EdgeInsets.only(
left: 2.w,
right: 2.w,
),
fontSize: 10.sp,
textColor: Colors.white,
),
))
.toList();
}
}

2
lib/union/union_details_page.dart

@ -306,7 +306,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
} else {
print("print 下载失败");
}
Future.delayed(Duration(seconds: 1), () {
Future.delayed(Duration(seconds: 1), (){
EasyLoading.dismiss();
});
}

57
lib/union/union_page.dart

@ -35,8 +35,8 @@ class UnionPage extends StatefulWidget {
class _UnionPage extends State<UnionPage>
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver {
final RefreshController refreshController = RefreshController(initialRefresh: false);
final RefreshController refreshController =
RefreshController(initialRefresh: false);
ApiService apiService;
bool isKeyBoardShow = false;
BMFCoordinate latLng;
@ -45,11 +45,11 @@ class _UnionPage extends State<UnionPage>
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
if (Location.getInstance() != null && Location.getInstance().aMapFlutterLocation != null)
if (Location.getInstance() != null &&
Location.getInstance().aMapFlutterLocation != null)
Location.getInstance().aMapFlutterLocation.stopLocation();
if (refreshController != null)
refreshController.dispose();
if (refreshController != null) refreshController.dispose();
}
@override
@ -89,8 +89,10 @@ class _UnionPage extends State<UnionPage>
startLocation() async {
EasyLoading.show(status: S.current.zhengzaijiazai);
Location.getInstance().aMapFlutterLocation
.onResultCallback().listen((event) {
Location.getInstance()
.aMapFlutterLocation
.onResultCallback()
.listen((event) {
if (event != null &&
event["latitude"] != null &&
event["longitude"] != null) {
@ -102,17 +104,15 @@ class _UnionPage extends State<UnionPage>
latLng = BMFCoordinate(event["latitude"], event["longitude"]);
}
BMFCalculateUtils.coordConvert(
coordinate: latLng,
fromType: BMF_COORD_TYPE.BD09LL,
toType: BMF_COORD_TYPE.COMMON)
coordinate: latLng,
fromType: BMF_COORD_TYPE.BD09LL,
toType: BMF_COORD_TYPE.COMMON)
.then((value) {
this.latLng = value;
saveLatLng(
value, event["province"], event["city"], event["district"]);
print(
"union: Location result ${value.latitude} "
"${value.longitude}",
);
print("union: Location result ${value.latitude} "
"${value.longitude}");
Location.getInstance().stopLocation();
queryStore(
"${value.latitude}",
@ -153,13 +153,16 @@ class _UnionPage extends State<UnionPage>
getLatLng() async {
SharedPreferences.getInstance().then(
(value) => {
apiService = ApiService(Dio(), context: context,
token: value.getString('token'), showLoading: false),
apiService = ApiService(Dio(),
context: context,
token: value.getString('token'),
showLoading: false),
if (value.containsKey("latitude") &&
value.containsKey("longitude") &&
value.containsKey("province") &&
value.containsKey("city") &&
value.containsKey("district")) {
value.containsKey("district"))
{
latLng = BMFCoordinate(double.tryParse(value.getString("latitude")),
double.tryParse(value.getString("longitude"))),
queryStore(
@ -266,12 +269,20 @@ class _UnionPage extends State<UnionPage>
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
// Navigator.of(context).pushNamed(
// '/router/union_detail_page',
// arguments: {
// "id": storeList[position].id,
// "storeName": storeList[position].storeName
// });
Navigator.of(context).pushNamed(
'/router/union_detail_page',
arguments: {
"id": storeList[position].id,
"storeName": storeList[position].storeName
});
'/router/store_order',
arguments: {
"id": storeList[position].id,
"storeName": storeList[position].storeName
},
);
},
child: buildStoreItem(storeList[position], position),
);
@ -301,7 +312,7 @@ class _UnionPage extends State<UnionPage>
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
),
],
),
child: TextField(

191
lib/union/union_view/union_coupon.dart

@ -1,7 +1,3 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
@ -12,57 +8,62 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
class UnionCoupon extends StatefulWidget {
final StoreInfo storeInfo;
final bool coupon;
final Function(String id) receiveCoupon;
UnionCoupon(this.storeInfo, this.receiveCoupon);
UnionCoupon(this.storeInfo, this.receiveCoupon, {this.coupon = false});
@override
State<StatefulWidget> createState() {
return _UnionCoupon();
}
}
class _UnionCoupon extends State<UnionCoupon> {
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.h, bottom: 10.h),
child: ItemTitle(
text: S.of(context).youhuiquan,
imgPath: "assets/image/icon_union_coupons.png",
),
),
(widget.storeInfo != null && widget.storeInfo.couponVOList != null)
? buildCoupon()
: Container(
width: double.infinity,
height: 50.h,
alignment: Alignment.center,
child: Text(
S.of(context).zanwuyouhuiquankelingqu,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFA0A0A0),
),
),
),
],
);
return (widget.coupon != null &&
widget.coupon &&
(widget.storeInfo != null && widget.storeInfo.couponVOList != null))
? buildCoupon()
: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.h, bottom: 10.h),
child: ItemTitle(
text: S.of(context).youhuiquan,
imgPath: "assets/image/icon_union_coupons.png",
),
),
(widget.storeInfo != null &&
widget.storeInfo.couponVOList != null)
? buildCoupon()
: Container(
width: double.infinity,
height: 50.h,
alignment: Alignment.center,
child: Text(
S.of(context).zanwuyouhuiquankelingqu,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFA0A0A0),
),
),
),
],
);
}
Widget buildCoupon() {
return Container(
height: 109.h,
child: ListView.builder(
itemCount: (widget.storeInfo != null && widget.storeInfo.couponVOList != null)
? widget.storeInfo.couponVOList.length
: 0,
itemCount:
(widget.storeInfo != null && widget.storeInfo.couponVOList != null)
? widget.storeInfo.couponVOList.length
: 0,
physics: BouncingScrollPhysics(parent: PageScrollPhysics()),
scrollDirection: Axis.horizontal,
itemBuilder: (context, position) {
@ -95,10 +96,10 @@ class _UnionCoupon extends State<UnionCoupon> {
child: Text.rich(TextSpan(children: [
TextSpan(
text: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo
.couponVOList[position].bizType ==
1)
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.bizType ==
1)
? "¥"
: "",
style: TextStyle(
@ -109,18 +110,21 @@ class _UnionCoupon extends State<UnionCoupon> {
),
TextSpan(
text: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo
.couponVOList[position].bizType ==
1)
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.bizType ==
1)
? "${double.tryParse(widget.storeInfo.couponVOList[position].discountAmount).toInt()}"
: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.bizType ==
5)
? S.of(context).duihuanquan
: "${widget.storeInfo.couponVOList[position].discountPercent ~/ 10}",
widget.storeInfo.couponVOList !=
null &&
widget
.storeInfo
.couponVOList[position]
.bizType ==
5)
? S.of(context).duihuanquan
: "${widget.storeInfo.couponVOList[position].discountPercent ~/ 10}",
style: TextStyle(
fontSize: 36.sp,
color: Color(0xFFFF7A1A),
@ -155,9 +159,9 @@ class _UnionCoupon extends State<UnionCoupon> {
children: [
Text(
(widget.storeInfo != null &&
widget.storeInfo.couponVOList != null)
? widget.storeInfo
.couponVOList[position].couponName
widget.storeInfo.couponVOList != null)
? widget.storeInfo.couponVOList[position]
.couponName
: "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
@ -169,22 +173,25 @@ class _UnionCoupon extends State<UnionCoupon> {
),
Text(
(widget.storeInfo != null &&
widget.storeInfo.couponVOList != null)
widget.storeInfo.couponVOList != null)
? (widget.storeInfo.couponVOList[position]
.bizType ==
1
? S.of(context).manlijiandaijinquan(
double.tryParse(widget.storeInfo
.couponVOList[position]
.fullAmount)
.toInt(),
double.tryParse(widget.storeInfo
.couponVOList[position]
.discountAmount)
.toInt())
: S.of(context).quanchangzhe(widget.storeInfo
.couponVOList[position]
.discountPercent))
.bizType ==
1
? S.of(context).manlijiandaijinquan(
double.tryParse(widget
.storeInfo
.couponVOList[position]
.fullAmount)
.toInt(),
double.tryParse(widget
.storeInfo
.couponVOList[position]
.discountAmount)
.toInt())
: S.of(context).quanchangzhe(widget
.storeInfo
.couponVOList[position]
.discountPercent))
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -195,17 +202,19 @@ class _UnionCoupon extends State<UnionCoupon> {
),
Text(
S.of(context).youxiaoqizhi(
(widget.storeInfo != null &&
widget.storeInfo.couponVOList !=
null &&
// widget.storeInfo.couponVOList[position].useStartTime != null &&
widget.storeInfo.couponVOList[position]
.useEndTime !=
null)
// ? "${widget.storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}"
? "${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}"
: "",
),
(widget.storeInfo != null &&
widget.storeInfo.couponVOList !=
null &&
// widget.storeInfo.couponVOList[position].useStartTime != null &&
widget
.storeInfo
.couponVOList[position]
.useEndTime !=
null)
// ? "${widget.storeInfo.couponVOList[position].useStartTime.replaceAll("-", ".").split(" ")[0]}-${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}"
? "${widget.storeInfo.couponVOList[position].useEndTime.replaceAll("-", ".").split(" ")[0]}"
: "",
),
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
@ -221,7 +230,9 @@ class _UnionCoupon extends State<UnionCoupon> {
onTap: () {
if (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position].status == 0) {
widget.storeInfo.couponVOList[position]
.status ==
0) {
widget.receiveCoupon(
widget.storeInfo.couponVOList[position].id);
}
@ -230,16 +241,18 @@ class _UnionCoupon extends State<UnionCoupon> {
height: 25.h,
child: RoundButton(
text: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position].status >
0)
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.status >
0)
? S.of(context).yilingqu
: S.of(context).lingqu,
textColor: Colors.white,
backgroup: (widget.storeInfo != null &&
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position].status >
0)
widget.storeInfo.couponVOList != null &&
widget.storeInfo.couponVOList[position]
.status >
0)
? Colors.grey
: Color(0xFF32A060),
padding: EdgeInsets.symmetric(
@ -259,6 +272,4 @@ class _UnionCoupon extends State<UnionCoupon> {
),
);
}
}
}

Loading…
Cancel
Save