From 081ffd723364469862628d0313a5bd7d4235650b Mon Sep 17 00:00:00 2001 From: flemming-it Date: Sun, 24 May 2026 23:18:51 +0200 Subject: [PATCH] fix(store-docs): readable blockquote in dark theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit flutter_markdown's MarkdownStyleSheet.fromTheme defaults the blockquote background to a hardcoded Colors.blue.shade100. In Dark Theme the text colour stays white-on-surface, so a blockquote rendered '> Note: ...' shows as white text on light blue — unreadable. Override blockquoteDecoration to use theme tokens (surfaceContainer + left primary accent border) and pin blockquote text to onSurface. tableCellsDecoration gets the same theme-driven treatment for the same class of issue. Signed-off-by: flemming-it --- lib/pages/store.dart | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/pages/store.dart b/lib/pages/store.dart index 05ce0e0..b28a236 100644 --- a/lib/pages/store.dart +++ b/lib/pages/store.dart @@ -2567,6 +2567,36 @@ class _DocsPanel extends StatelessWidget { color: theme.colorScheme.surfaceContainer, borderRadius: BorderRadius.circular(FaiRadius.sm), ), + // flutter_markdown default-blockquote nutzt + // hardcodiertes `Colors.blue.shade100` als + // Background, was im Dark-Theme mit weißem Text + // unlesbar wird. Wir setzen Theme-konsistente + // Werte: surfaceContainer-Background + linke + // Akzent-Border, Text in onSurface. + blockquote: theme.textTheme.bodyMedium?.copyWith( + color: theme.colorScheme.onSurface, + ), + blockquoteDecoration: BoxDecoration( + color: theme.colorScheme.surfaceContainer, + borderRadius: BorderRadius.circular(FaiRadius.sm), + border: Border( + left: BorderSide( + color: theme.colorScheme.primary, + width: 3, + ), + ), + ), + blockquotePadding: const EdgeInsets.fromLTRB( + FaiSpace.md, + FaiSpace.sm, + FaiSpace.sm, + FaiSpace.sm, + ), + // Tabellen-Cells haben dasselbe Default-Problem + // (Material-2-Light-Annahme). Theme-Werte erzwingen. + tableCellsDecoration: BoxDecoration( + color: theme.colorScheme.surfaceContainerHigh, + ), ), ), );