issue 10360, реализация выбора купонов к гашению в покупке
This commit is contained in:
@@ -108,12 +108,13 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
if (this.coupons.length > 0) {
|
||||
widgetList.add(getItemTitle(StringsLocalization.couponsUsed()));
|
||||
this.coupons.forEach((couponItem) {
|
||||
widgetList.add(getCoupons(couponItem));
|
||||
widgetList.add(getItemToggle(
|
||||
couponItem['offer_name'],
|
||||
couponItem['coupon_condition']
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
widgetList.add(wrapButton(getScreenMargins(174.0), getScanButton()));
|
||||
|
||||
return new ListView.builder(
|
||||
@@ -140,33 +141,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
};
|
||||
}
|
||||
|
||||
getCoupons(couponItem) {
|
||||
String title = couponItem['offer_name'];
|
||||
if (title.length == 0) {
|
||||
title = couponItem['coupon_condition'].substring(0,30) + " ...";
|
||||
}
|
||||
return new Container(
|
||||
margin: new EdgeInsets.only(left: 5.0, right: 5.0, top: 5.0),
|
||||
child: new Card(
|
||||
child: new ExpansionTile(
|
||||
title: new Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.button.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: faqTitlesColor
|
||||
)
|
||||
),
|
||||
children: [
|
||||
new Container(
|
||||
margin: new EdgeInsets.only(left: 20.0, right: 20.0),
|
||||
padding: new EdgeInsets.only(top: 0.0, bottom: 10.0),
|
||||
child: new Text(couponItem['coupon_condition']),
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
getSuccessMessage() {
|
||||
return new Row(
|
||||
|
||||
Reference in New Issue
Block a user