Android all done.

This commit is contained in:
Ivan Murashov
2018-03-12 21:41:41 +03:00
parent 3bc43724c6
commit 11640c0a16
15 changed files with 111 additions and 253 deletions

View File

@@ -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));
}