refactor: replace Navigator with Modular for dialog dismissal in client hubs and settings actions

This commit is contained in:
Achintha Isuru
2026-02-03 22:59:00 -05:00
parent 9e764ab2e4
commit 2083b5dbff
2 changed files with 3 additions and 3 deletions

View File

@@ -248,15 +248,15 @@ class ClientHubsPage extends StatelessWidget {
),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(dialogContext).pop(),
onPressed: () => Modular.to.pop(),
child: const Text('Cancel'),
),
TextButton(
onPressed: () {
Navigator.of(dialogContext).pop();
BlocProvider.of<ClientHubsBloc>(
context,
).add(ClientHubsDeleteRequested(hub.id));
Modular.to.pop();
},
style: TextButton.styleFrom(
foregroundColor: UiColors.destructive,

View File

@@ -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(),
),
],
),