From cd4900f8a91246cdeb91df8beca3f8aa7d5c3df8 Mon Sep 17 00:00:00 2001 From: zarzet <42882290+zarzet@users.noreply.github.com> Date: Fri, 23 Oct 2026 23:17:31 +0700 Subject: [PATCH] fix(settings): read the restore heading style inside the dialog The heading's text style came from the page theme after the move to showAppConfirmDialog; a Builder resolves it from the dialog again, as the old dialog did. --- lib/screens/settings/backup_restore_page.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/screens/settings/backup_restore_page.dart b/lib/screens/settings/backup_restore_page.dart index c7ca81490..e9b76e2ce 100644 --- a/lib/screens/settings/backup_restore_page.dart +++ b/lib/screens/settings/backup_restore_page.dart @@ -191,7 +191,6 @@ class _BackupRestorePageState extends ConsumerState { Future _confirmRestore(BackupBundle bundle) { final l10n = context.l10n; - final theme = Theme.of(context); return showAppConfirmDialog( context, title: l10n.backupRestoreConfirmTitle, @@ -204,10 +203,12 @@ class _BackupRestorePageState extends ConsumerState { children: [ Text(l10n.backupSelectedRestoreMessage), const SizedBox(height: 16), - Text( - l10n.backupContentsTitle, - style: theme.textTheme.titleSmall?.copyWith( - fontWeight: FontWeight.w700, + Builder( + builder: (dialogContext) => Text( + l10n.backupContentsTitle, + style: Theme.of( + dialogContext, + ).textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w700), ), ), const SizedBox(height: 6),