Исправлены баги
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user