Flutter Desktop MACOS does anyone has an example for platform channel?

915

Solution 1

Any plugin that supports macOS, such as shared_preferences or url_launcher, is an example of using platform channels.

Also, the macOS channel APIs are shared with iOS, so the iOS example you linked to applies to macOS as well.

Solution 2

The answer existed talked about channel usage building plugins, and I saw one example building macOS apps (not plugins, as there are some differences between them) with platform channel here on GitHub.

(I found this by searching codes with Channel applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) on GitHub)

Share:
915
Adrian M Cavazos
Author by

Adrian M Cavazos

Updated on December 20, 2022

Comments

  • Adrian M Cavazos
    Adrian M Cavazos over 1 year

    im trying to do a platform channel to macos but cant find a proper example. The current documentation only has examples for android and ios here. Ive googled it and seems from the github theres support. Can anyone clarify? Thank you.