Open GroovinChip opened 2 years ago
Could this be of any help?
Also, a more complete way of getting the accent color.
Also, a more complete way of getting the accent color.
Okay, I have done a first pass on this feature via the code found above. It should be noted that this is done through MethodChannel
, though, not EventChannel
. I tried doing that and I kept getting null
back for the color. See this gist for more on that attempt.
This code is available to browse in the accent_color_listener
branch
@Adrian-Samoticha this is relevant to our accuracy work.
Currently, we are hardcoding the bizarrely-named
MacosColors.controlAccentColor
, which is the user's selected system accent color. (Obviously this name doesn't make much sense, but that's what Apple calls it...).Obviously, someone making a macOS application would expect that their choice of system-level accent color would be reflected in their application unless explicitly overridden. Since
macos_ui
is now a plugin, we can leverage Flutter'sEventChannel
to listen to the nativecontrolAccentColor
's value.This would require some refactoring to
MacosColors
sincecontrolAccentColor
is a static value. I'm not quite certain the best way to proceed with this at this time.