Android all done.
This commit is contained in:
@@ -39,6 +39,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
int bonusPlus = 0;
|
||||
int bonusMinus = 0;
|
||||
int currency;
|
||||
String token;
|
||||
bool showBonus;
|
||||
|
||||
bool isAutomaticallyImplyLeading() => false;
|
||||
@@ -51,15 +52,18 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
return null;
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
|
||||
if (currency == null) {
|
||||
helper.getCurrency().then((currency) {
|
||||
setState(() {
|
||||
this.currency = currency;
|
||||
});
|
||||
@override
|
||||
void initState() {
|
||||
helper.getCurrency().then((currency) {
|
||||
helper.getToken().then((token) {
|
||||
this.currency = currency;
|
||||
this.token = token;
|
||||
});
|
||||
}
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
|
||||
if (this.details['sum_bonus'] is String) {
|
||||
String regexString = r'(\d+) начислено, (\d+).*';
|
||||
@@ -122,9 +126,8 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
||||
return new EdgeInsets.only(bottom: bottom, left: side, right: side);
|
||||
}
|
||||
|
||||
getScanButton() async {
|
||||
getScanButton() {
|
||||
String title = StringsLocalization.scan();
|
||||
String token = await helper.getToken();
|
||||
return buildRaisedButton(title, () => Navigator.of(context).pop(token));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user