Исправлены баги

This commit is contained in:
Ivan Murashov
2017-09-26 12:51:30 +03:00
parent 7a1dc84fa1
commit ac7146f46e
7 changed files with 58 additions and 60 deletions

View File

@@ -26,8 +26,8 @@ pushRoute(BuildContext context, Widget widget) {
}
// Добавление route, с возможностью вернуться к предыдущему экрану.
faq(BuildContext context, bool returnToScanner) {
pushRoute(context, new FAQScreen(returnToScanner));
faq(SqliteHelper helper, String app, BuildContext context, bool returnToScanner) {
pushRoute(context, new FAQScreen(helper, app, returnToScanner));
}
// В методе отправляется запрос на удаление токена кассы, очищаются SharedPreferences приложения.
@@ -93,7 +93,7 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async {
if (call.method == 'logout') {
forceLogout(token, context);
} else if (call.method == 'faq') {
faq(context, true);
faq(helper, app, context, true);
} else if(call.method == 'settings') {
if (helper == null) {
helper = new SqliteHelper();
@@ -108,8 +108,7 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async {
String card = call.arguments[1];
var route = new MaterialPageRoute<Null>(
builder: (BuildContext context) =>
new PurchaseScreen(
userString, card));
new PurchaseScreen(helper, app, userString, card));
while (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}