-
-
Notifications
You must be signed in to change notification settings - Fork 19
Reactive Theming on macOS #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @bdlukaa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully adds support for reactive theming on macOS by listening for system accent color changes. The implementation correctly uses an EventChannel and NSSystemColorsDidChangeNotification on the native side. The migration of the macOS plugin to a Swift Package is also a great modernization step.
I've left a few comments:
- A critical issue in the
system_theme.podspecwhere the macOS platform version needs to be updated to prevent build failures for CocoaPods users. - Two suggestions in the
SystemThemePlugin.swiftfile to improve code clarity and maintainability by using a system constant and removing a redundant availability check.
Overall, this is a solid contribution. Addressing the comments will make it even better.
system_theme/macos/system_theme/Sources/system_theme/SystemThemePlugin.swift
Outdated
Show resolved
Hide resolved
system_theme/macos/system_theme/Sources/system_theme/SystemThemePlugin.swift
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds reactive theming support for macOS by implementing event streaming for system accent color changes. The implementation mirrors the existing Windows functionality, allowing Flutter applications to respond dynamically to macOS system theme changes.
Key changes:
- Implemented macOS event streaming for accent color changes using NotificationCenter observers
- Restructured the macOS plugin to use Swift Package Manager structure alongside CocoaPods
- Updated Dart library to include macOS in platforms that support listening to accent color changes
Reviewed changes
Copilot reviewed 15 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
system_theme/macos/system_theme/Sources/system_theme/SystemThemePlugin.swift |
New Swift plugin implementation with FlutterStreamHandler support for reactive theme updates |
system_theme/macos/system_theme/Package.swift |
Swift Package Manager manifest for the macOS plugin |
system_theme/macos/system_theme.podspec |
Updated source files path to match new Swift package structure |
system_theme/macos/Classes/SystemThemePlugin.swift |
Removed old plugin implementation (replaced by new structure) |
system_theme/lib/system_theme.dart |
Added macOS to platforms supporting accent color change listeners |
system_theme/example/macos/Runner/AppDelegate.swift |
Updated to use @main annotation and added secure restorable state support |
system_theme/example/macos/Runner.xcodeproj/project.pbxproj |
Updated Xcode project to use Swift Package Manager and increased deployment target to 10.15 |
system_theme/example/macos/Runner.xcworkspace/contents.xcworkspacedata |
Added Pods project reference to workspace |
system_theme/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme |
Updated build scheme with Flutter framework preparation script |
system_theme/example/ios/Podfile |
Added iOS Podfile configuration |
system_theme/example/ios/Flutter/Release.xcconfig |
Added Pods configuration import |
system_theme/example/ios/Flutter/Debug.xcconfig |
Added Pods configuration import |
system_theme/.gitignore |
Added .swiftpm directory to gitignore |
.DS_Store |
macOS system file that should not be committed |
system_theme/pubspec.lock |
Updated transitive dependencies and Dart SDK constraint |
system_theme_web/pubspec.lock |
Updated transitive dependencies and Dart SDK constraint |
system_theme/example/pubspec.lock |
Updated transitive dependencies and Dart SDK constraint |
Files not reviewed (1)
- system_theme/example/macos/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
#6
system_theme.reactive.theme.mov