System Menubar icon macOS

Hi I'm developing a macOS desktop app. I'd like my application, when installed, to have a custom icon on the top right system menu bar (near where the time and wifi icons are). An example of this is TunnelBear icon + UI (https://imgur.com/a/DSullUS).

Can someone point me to the APIs needed for building a feature like this?

(Bonus points: I'd like the UI displayed onClick to be rendered by Flutter (which the main app views are using), any idea how that could be done?)

https://developer.apple.com/documentation/appkit/nsstatusbar/

System Menubar icon macOS
 
 
Q