fix(store-docs): readable blockquote in dark theme
Some checks failed
Security / Security check (push) Failing after 1s

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 <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-24 23:18:51 +02:00
parent 98a6414eaa
commit 081ffd7233

View file

@ -2567,6 +2567,36 @@ class _DocsPanel extends StatelessWidget {
color: theme.colorScheme.surfaceContainer, color: theme.colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(FaiRadius.sm), 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,
),
), ),
), ),
); );