Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove ThemeData.cardColor from code background color when using ma…
…terial theme
  • Loading branch information
HosamHasanRamadan committed Sep 24, 2024
commit 1f8fe6606ee3f880139beaec59af84e05cb32141
2 changes: 2 additions & 0 deletions packages/flutter_markdown/lib/src/style_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class MarkdownStyleSheet {
p: theme.textTheme.bodyMedium,
pPadding: EdgeInsets.zero,
code: theme.textTheme.bodyMedium!.copyWith(
backgroundColor: theme.cardTheme.color,
fontFamily: 'monospace',
fontSize: theme.textTheme.bodyMedium!.fontSize! * 0.85,
),
Expand Down Expand Up @@ -280,6 +281,7 @@ class MarkdownStyleSheet {
p: theme.textTheme.bodyMedium,
pPadding: EdgeInsets.zero,
code: theme.textTheme.bodyMedium!.copyWith(
backgroundColor: theme.cardTheme.color,
fontFamily: 'monospace',
fontSize: theme.textTheme.bodyMedium!.fontSize! * 0.85,
),
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_markdown/test/style_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ void defineTests() {
expect(
style.code!.fontSize, theme.textTheme.bodyMedium!.fontSize! * 0.85);
expect(style.code!.fontFamily, 'monospace');
expect(style.code!.backgroundColor, theme.cardTheme.color);

// H1
expect(style.h1, theme.textTheme.headlineSmall);
Expand Down