fixed
This commit is contained in:
@@ -42,6 +42,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
int bonusMinus = 0;
|
int bonusMinus = 0;
|
||||||
int currency;
|
int currency;
|
||||||
bool showBonus;
|
bool showBonus;
|
||||||
|
String flavor;
|
||||||
|
|
||||||
@override String getTitle() {
|
@override String getTitle() {
|
||||||
return StringsLocalization.carryingPurchase();
|
return StringsLocalization.carryingPurchase();
|
||||||
@@ -59,11 +60,13 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (showBonus == null) {
|
if (this.flavor == null) {
|
||||||
platform.invokeMethod('showBonus').then((showBonus) {
|
platform.invokeMethod('getFlavor').then((flavor) {
|
||||||
setState(() {
|
setState(() {
|
||||||
this.showBonus = showBonus;
|
this.flavor = flavor;
|
||||||
if (showBonus == true) {
|
// if (showBonus == true) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
if (this.details['sum_bonus'] is String) {
|
if (this.details['sum_bonus'] is String) {
|
||||||
String regexString = r'(\d+) начислено, (\d+).*';
|
String regexString = r'(\d+) начислено, (\d+).*';
|
||||||
RegExp regExp = new RegExp(regexString);
|
RegExp regExp = new RegExp(regexString);
|
||||||
@@ -79,7 +82,6 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
this.bonusPlus = this.details['sum_bonus'];
|
this.bonusPlus = this.details['sum_bonus'];
|
||||||
//bonusMinus = this.details['sum_bonus'];
|
//bonusMinus = this.details['sum_bonus'];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -92,17 +94,19 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
List <Widget> widgetList = <Widget>[];
|
List <Widget> widgetList = <Widget>[];
|
||||||
widgetList.add(getValueWithDescription(StringsLocalization.buyer(), username));
|
widgetList.add(getValueWithDescription(StringsLocalization.buyer(), username));
|
||||||
widgetList.add(getSuccessMessage());
|
widgetList.add(getSuccessMessage());
|
||||||
if (showBonus == true) {
|
|
||||||
if (bonusPlus > 0) {
|
if (bonusPlus > 0) {
|
||||||
widgetList.add(getValueWithDescription(StringsLocalization.bonusPlus(), bonusPlus.toString()));
|
widgetList.add(getValueWithDescription(StringsLocalization.bonusPlus(), bonusPlus.toString()));
|
||||||
}
|
}
|
||||||
if (bonusMinus > 0) {
|
if (bonusMinus > 0) {
|
||||||
widgetList.add(getValueWithDescription(StringsLocalization.bonusMinus(), bonusMinus.toString()));
|
widgetList.add(getValueWithDescription(StringsLocalization.bonusMinus(), bonusMinus.toString()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (this.flavor != 'autobonus') {
|
||||||
widgetList.add(getValueWithDescription(StringsLocalization.discountRate(), '${details['discount']}%'));
|
widgetList.add(getValueWithDescription(StringsLocalization.discountRate(), '${details['discount']}%'));
|
||||||
widgetList.add(getValueWithDescription(StringsLocalization.discountSum(), '${details['sum_discount']}'));
|
widgetList.add(getValueWithDescription(StringsLocalization.discountSum(), '${details['sum_discount']}'));
|
||||||
|
}
|
||||||
|
|
||||||
// widgetList.add( new Expanded(child: new Center()));
|
// widgetList.add( new Expanded(child: new Center()));
|
||||||
this.coupons.forEach((couponItem) {
|
this.coupons.forEach((couponItem) {
|
||||||
widgetList.add(getCoupons(couponItem));
|
widgetList.add(getCoupons(couponItem));
|
||||||
|
|||||||
Reference in New Issue
Block a user