From 2083b5dbff43fc93485714ab4b9b5f7213343b6f Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 3 Feb 2026 22:59:00 -0500 Subject: [PATCH] refactor: replace Navigator with Modular for dialog dismissal in client hubs and settings actions --- .../hubs/lib/src/presentation/pages/client_hubs_page.dart | 4 ++-- .../widgets/client_settings_page/settings_actions.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart index ab56e3ae..aa3de3e2 100644 --- a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart +++ b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart @@ -248,15 +248,15 @@ class ClientHubsPage extends StatelessWidget { ), actions: [ TextButton( - onPressed: () => Navigator.of(dialogContext).pop(), + onPressed: () => Modular.to.pop(), child: const Text('Cancel'), ), TextButton( onPressed: () { - Navigator.of(dialogContext).pop(); BlocProvider.of( context, ).add(ClientHubsDeleteRequested(hub.id)); + Modular.to.pop(); }, style: TextButton.styleFrom( foregroundColor: UiColors.destructive, diff --git a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart index e3e99090..e044d1ec 100644 --- a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart +++ b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart @@ -83,7 +83,7 @@ class SettingsActions extends StatelessWidget { // Cancel button UiButton.secondary( text: t.common.cancel, - onPressed: () => Navigator.of(dialogContext).pop(), + onPressed: () => Modular.to.pop(), ), ], ),