From 7e73d7532745350977b6f4d95a1b3770b6175ec1 Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Mon, 18 Mar 2024 18:58:03 +0530 Subject: [PATCH] ptch: routes to login page after logout --- .../app_settings/app_settings_page.dart | 8 +++++--- .../app_settings/app_setting_page_test.dart | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/views/after_auth_screens/app_settings/app_settings_page.dart b/lib/views/after_auth_screens/app_settings/app_settings_page.dart index 15808550a2..0236332c6d 100644 --- a/lib/views/after_auth_screens/app_settings/app_settings_page.dart +++ b/lib/views/after_auth_screens/app_settings/app_settings_page.dart @@ -309,10 +309,12 @@ class AppSettingsPage extends StatelessWidget { } navigationService.pop(); navigationService.removeAllAndPush( - '/selectLang', - '/', + Routes.setUrlScreen, + Routes.splashScreen, + arguments: '', ); - } catch (e) { + } + catch (e) { navigationService.pushDialog( const TalawaErrorDialog( 'Unable to logout, please try again.', diff --git a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart index 5ab7fbf34c..29168a713a 100644 --- a/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart +++ b/test/widget_tests/after_auth_screens/app_settings/app_setting_page_test.dart @@ -8,6 +8,7 @@ import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; import 'package:talawa/constants/constants.dart'; import 'package:talawa/constants/custom_theme.dart'; +import 'package:talawa/constants/routing_constants.dart'; import 'package:talawa/models/language/language_model.dart'; import 'package:talawa/router.dart' as router; import 'package:talawa/services/graphql_config.dart'; @@ -325,9 +326,10 @@ Future main() async { verify(navigationService.pop()); verify( navigationService.removeAllAndPush( - '/selectLang', - '/', - ), + Routes.setUrlScreen, + Routes.splashScreen, + arguments: '', + ), ); }); });