files
This commit is contained in:
18
macos/Classes/NativePlugin.swift
Normal file
18
macos/Classes/NativePlugin.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
import FlutterMacOS
|
||||
import AppKit
|
||||
|
||||
public protocol NativePlugin {
|
||||
func register(with registrar: FlutterPluginRegistrar)
|
||||
}
|
||||
|
||||
public enum UxWindow {
|
||||
public static var keyWindow: NSWindow? {
|
||||
NSApp.keyWindow ?? NSApp.mainWindow
|
||||
}
|
||||
|
||||
/// FlutterViewController's view. Used as the anchor for
|
||||
/// `NSSharingServicePicker` popovers.
|
||||
public static var flutterView: NSView? {
|
||||
keyWindow?.contentViewController?.view
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user