Once we've completed support for PlatformViews on macOS we'll need a page similar to https://docs.flutter.dev/platform-integration/ios/platform-views covering the creation of platform views on macOS.
For the most part, the framework code should be near-identical other than substituting AppKitView where UiKitView is used for iOS and ensuring that any platform-specific checks reference Platform.macOS instead of Platform.iOS.
On the Swift side, there are some small differences in where and how to register platformViews, and the fact that the macOS view being created is an NSView rather than a UIKitView.
For reference, I have a macOS PlatformView example that wraps an Apple Maps MKMapView here:
https://github.com/cbracken/platformview_test.
Part of: flutter/flutter#41722
Once we've completed support for PlatformViews on macOS we'll need a page similar to https://docs.flutter.dev/platform-integration/ios/platform-views covering the creation of platform views on macOS.
For the most part, the framework code should be near-identical other than substituting
AppKitViewwhereUiKitViewis used for iOS and ensuring that any platform-specific checks reference Platform.macOS instead of Platform.iOS.On the Swift side, there are some small differences in where and how to register platformViews, and the fact that the macOS view being created is an
NSViewrather than aUIKitView.For reference, I have a macOS PlatformView example that wraps an Apple Maps MKMapView here:
https://github.com/cbracken/platformview_test.
Part of: flutter/flutter#41722