Files
ux/macos/Classes/NativePlugin.swift
agra d68a2978eb ux: bulk WIP — UxPlugin→XPlugin rename + new anim/core/navi/reactive packages
Catch-all commit for outstanding pre-existing local changes. Mixes
several themes that would normally be split:

- Rename: UxPlugin → XPlugin across iOS, macOS, Android registrants.
- New top-level packages under lib/src/: anim/ (animated values,
  panes, sheets, dock, measured), core/ (Emitter, ReactiveBuilder
  scaffolding, presenter/widget/value/dispose primitives), navi/
  (Screen/ScreenStack/Router/hero/transitions), reactive/.
- Edits across existing plugins (clipboard, crash, file, gallery,
  keyboard, scanner, sensor, url) to align with the new core.
- Test updates and CHANGELOG/README touches accompanying the above.
2026-05-21 08:58:07 +03:00

19 lines
449 B
Swift

import FlutterMacOS
import AppKit
public protocol NativePlugin {
func register(with registrar: FlutterPluginRegistrar)
}
public enum XWindow {
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
}
}