'What is the proper usage of NSColorPanel's colorDidChangeNotification?

I am writing a Flutter macOS plugin that allows the user to launch the native macOS color picker and stream back their color selections via EventChannel.

I am able to launch the picker, but the color selection does not get streamed back. I believe this is because I am not making use of colorDidChangeNotification, which appears to be a handler for color selection changes for the current NSColorPanel. I have not been able to find an example for this function. What is the proper way to use it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source