issue 10305, final
This commit is contained in:
@@ -64,9 +64,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
setState(() {
|
||||
this.flavor = flavor;
|
||||
// if (showBonus == true) {
|
||||
//
|
||||
// }
|
||||
|
||||
if (this.details['sum_bonus'] is String) {
|
||||
String regexString = r'(\d+) начислено, (\d+).*';
|
||||
RegExp regExp = new RegExp(regexString);
|
||||
@@ -80,7 +78,6 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
|
||||
if (this.details['sum_bonus'] is int) {
|
||||
this.bonusPlus = this.details['sum_bonus'];
|
||||
//bonusMinus = this.details['sum_bonus'];
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -108,11 +105,16 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
}
|
||||
|
||||
// widgetList.add( new Expanded(child: new Center()));
|
||||
this.coupons.forEach((couponItem) {
|
||||
widgetList.add(getCoupons(couponItem));
|
||||
});
|
||||
if (this.coupons.length > 0) {
|
||||
widgetList.add(getItemTitle(StringsLocalization.couponsUsed()));
|
||||
this.coupons.forEach((couponItem) {
|
||||
widgetList.add(getCoupons(couponItem));
|
||||
});
|
||||
}
|
||||
|
||||
widgetList.add(wrapButton(getScreenMargins(74.0), getScanButton()));
|
||||
|
||||
|
||||
widgetList.add(wrapButton(getScreenMargins(174.0), getScanButton()));
|
||||
|
||||
return new ListView.builder(
|
||||
itemBuilder: (BuildContext context, int index) => widgetList[index],
|
||||
@@ -139,12 +141,16 @@ 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(
|
||||
couponItem['offer_name'],
|
||||
title,
|
||||
style: Theme.of(context).textTheme.button.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: faqTitlesColor
|
||||
|
||||
Reference in New Issue
Block a user