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),