Move logout button to settings. Replace logout button in menu with shutdown button.
This commit is contained in:
@@ -45,8 +45,8 @@ logout(BuildContext context, SqliteHelper helper) async {
|
||||
getDeleteTokenRequest(token).then((response) {
|
||||
helper.clear().then((result) {
|
||||
// helper.close().then((_) {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pop();
|
||||
// Navigator.of(context).pop();
|
||||
// Navigator.of(context).pop();
|
||||
pushRouteReplacement(
|
||||
context, new SplashScreen()); // Запускаем регистрацию
|
||||
// });
|
||||
@@ -93,15 +93,13 @@ startScanner(BuildContext context, String app, SqliteHelper helper) async {
|
||||
} else {
|
||||
String token = await helper.getToken();
|
||||
// Канал ловит вызовы методов из "нативной" части приложения.
|
||||
// Могут быть вызваны либо logout либо faq, либо purchase.
|
||||
// Могут быть вызваны либо exit либо faq, либо purchase.
|
||||
if (token != null) {
|
||||
platform.setMethodCallHandler((MethodCall call) async {
|
||||
print('flutter handler');
|
||||
print(call.method);
|
||||
|
||||
if (call.method == 'logout') {
|
||||
forceLogout(token, context);
|
||||
} else if (call.method == 'findUser') {
|
||||
if (call.method == 'findUser') {
|
||||
|
||||
var userResponse;
|
||||
String cardPhone = call.arguments[0];
|
||||
|
||||
Reference in New Issue
Block a user