Smoth screen changes. Step 1
This commit is contained in:
@@ -33,11 +33,9 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
|
||||
TextEditingController bonusController = new TextEditingController();
|
||||
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) {
|
||||
PurchaseScreenState(SqliteHelper helper, String app, String userString, String card) : super(helper, app) {
|
||||
this.user = JSON.decode(userString);
|
||||
this.card = card;
|
||||
this.helper = helper;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -45,7 +43,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
setState(() {
|
||||
requestAsyncData(user);
|
||||
});
|
||||
return new WillPopScope(onWillPop: onWillPop, child: getMainWidget());
|
||||
return getMainWidget();
|
||||
}
|
||||
|
||||
bool purchaseInProgress = false;
|
||||
@@ -173,15 +171,14 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
height: buttonHeight,
|
||||
child: new FlatButton(
|
||||
child: new Text(title, style: new TextStyle(color: textColor)),
|
||||
onPressed: () => startScanner(context, app, helper)),
|
||||
// FIXME: onPressed: () => startScanner(context, app, helper)),
|
||||
onPressed: () => print('startScanner')),
|
||||
decoration: new BoxDecoration(
|
||||
border: new Border.all(
|
||||
color: Resources.getButtonColor(app), width: 1.0),
|
||||
borderRadius: new BorderRadius.all(new Radius.circular(4.0))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@override
|
||||
String getTitle() {
|
||||
return StringsLocalization.carryingPurchase();
|
||||
@@ -424,7 +421,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
||||
print('bonus ' + this.bonus);
|
||||
}
|
||||
|
||||
onWillPop() {
|
||||
return startScanner(context, app, helper);
|
||||
}
|
||||
// onWillPop() {
|
||||
// return startScanner(context, app, helper);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user