fixed bug with 'back' link
This commit is contained in:
@@ -136,7 +136,17 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async {
|
||||
|
||||
print(userString);
|
||||
print(cardPhone);
|
||||
pushRoute(context, new PurchaseScreen(helper, app, JSON.encode(users[0]), cardPhone));
|
||||
// pushRoute(context, new PurchaseScreen(helper, app, JSON.encode(users[0]), cardPhone));
|
||||
|
||||
var route = new MaterialPageRoute<Null>(
|
||||
builder: (BuildContext context) =>
|
||||
new PurchaseScreen(helper, app, JSON.encode(users[0]), cardPhone)
|
||||
);
|
||||
while (Navigator.of(context).canPop()) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
Navigator.of(context).pushReplacement(route);
|
||||
|
||||
} else {
|
||||
throw new FlutterError("Users not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user