Экран переключения валюты открывается с первого раза, соединение с базой данных не открывается на тех экранах, на которых это не требуется
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:checker/screens/faq.dart';
|
||||
import 'package:checker/screens/purchase.dart';
|
||||
import 'package:checker/screens/registration.dart';
|
||||
import 'package:checker/screens/splash.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
@@ -43,7 +44,7 @@ logout(BuildContext context) async {
|
||||
platform.invokeMethod('removeKeys').then((result) {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
pushRouteReplacement(context, new RegistrationScreen()); // Запускаем регистрацию
|
||||
pushRouteReplacement(context, new SplashScreen()); // Запускаем регистрацию
|
||||
});
|
||||
}).catchError((error) {
|
||||
print(error.toString());
|
||||
@@ -66,7 +67,7 @@ forceLogout(String token , BuildContext context) async {
|
||||
helper.clear().then((_) {
|
||||
helper.close().then((_) {
|
||||
Navigator.of(context).pop();
|
||||
pushRouteReplacement(context, new RegistrationScreen()); // Запускаем регистрацию
|
||||
pushRouteReplacement(context, new SplashScreen());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user