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

Viewed 1352

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.

2 Answers

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)

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.

Related