Skip to content

Fix brightness detection and integrate dynamic color support#60

Merged
adeeteya merged 2 commits into
masterfrom
theme
Apr 13, 2026
Merged

Fix brightness detection and integrate dynamic color support#60
adeeteya merged 2 commits into
masterfrom
theme

Conversation

@adeeteya

Copy link
Copy Markdown
Owner

This pull request introduces dynamic color support to the application, allowing it to use system-provided color schemes when available, and falls back to a default color if not. The changes also include the necessary setup for the dynamic_color package across all platforms and update the theme logic in the main app.

Dynamic color support and platform integration:

  • Added the dynamic_color package to pubspec.yaml and imported it in main.dart to enable dynamic color theming. [1] [2]
  • Updated theme logic in MarkdownEditorApp to use dynamic color schemes (DynamicColorBuilder) for both light and dark themes, falling back to Colors.indigo when dynamic colors are unavailable. [1] [2]

Platform-specific plugin registration:

  • Registered the dynamic_color plugin for Linux, macOS, and Windows by updating the respective generated plugin registrant files and CMake lists. [1] [2] [3] [4] [5]

Minor code improvements:

  • Replaced PlatformDispatcher.instance with WidgetsBinding.instance.platformDispatcher for consistency and to avoid deprecation warnings in device_preference_notifier.dart. [1] [2]

Fixes #35

@adeeteya adeeteya self-assigned this Apr 13, 2026
@adeeteya adeeteya merged commit efd21a0 into master Apr 13, 2026
1 check passed
@adeeteya adeeteya deleted the theme branch April 13, 2026 13:33
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.

Material You color and system dark mode support

1 participant