Skip to content

Use ThemeData instead of hardcoded Colors in MarkdownStyleSheet (Dark Mode Support)#126

Open
bilaldev05 wants to merge 1 commit into
foresightmobile:mainfrom
bilaldev05:fix-stylesheet-theme-colors
Open

Use ThemeData instead of hardcoded Colors in MarkdownStyleSheet (Dark Mode Support)#126
bilaldev05 wants to merge 1 commit into
foresightmobile:mainfrom
bilaldev05:fix-stylesheet-theme-colors

Conversation

@bilaldev05

Copy link
Copy Markdown

Summary

Replaced hardcoded Colors.* usages in MarkdownStyleSheet with theme-aware values derived from ThemeData.

Problem

Several style properties were using fixed color values, which prevented proper dark mode support and ignored app theme customizations.

Changes

  • Replaced Colors.* references with:
    • theme.colorScheme
    • theme.textTheme
  • Ensured compatibility with both light and dark themes
  • Verified example app works in dark mode

Result

  • Proper dark mode support
  • Improved Material 3 compatibility
  • Styles now adapt to parent app theme

@bilaldev05

Copy link
Copy Markdown
Author

Hi 👋 I'd like to work on this issue.
Since the original thread is locked, should I open a fresh issue referencing this one?

@gazreese

gazreese commented Jul 7, 2026

Copy link
Copy Markdown
Member

Thanks for this, @bilaldev05 — theme-aware colours are genuinely wanted here (they'd help close #95 and #121).

However, the current branch doesn't contain the changes described. The only diff against main is in example/pubspec.lock, which actually downgrades two transitive dev dependencies:

  • meta 1.17.01.16.0
  • test_api 0.7.70.7.6

None of the described MarkdownStyleSheet changes (Colors.*theme.colorScheme/theme.textTheme) are present, and the branch is currently conflicting with main.

Could you re-push with the real lib/src/style_sheet.dart changes, rebased on the latest main, and revert the example/pubspec.lock downgrade? Happy to review and get this merged once the intended changes are on the branch. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants