Skip to main content

nativeapi_flutter 0.6.0 copy "nativeapi_flutter: ^0.6.0" to clipboard
nativeapi_flutter: ^0.6.0 copied to clipboard

Flutter integration for nativeapi: widgets, dart:ui conversions and the multi-window bridge on top of package:nativeapi.

0.6.0 #

  • Breaking: requires Flutter 3.50 / Dart 3.14. package:nativeapi_flutter/windowing.dart works with Flutter's renamed multi-window API (WindowController, Window, formerly RegularWindowController, RegularWindow).
  • macOS: preserve a pending Flutter quit decision when AppKit acknowledges synchronous cancellation, so approving the later Dart response exits normally (nativeapi-core#65).
  • Linux: implement tray context menu popups and dismissal on X11, including double-click triggers. Document the native Wayland requirement to use host-rendered Clicked or RightClicked menus (nativeapi-core#88).
  • Stop importing the experimental plain-Dart event-loop helper so Flutter apps compile on Dart 3.14 without the removed isolate APIs or experimental flags (#22).
  • Fix iOS and Android release builds failing in gen_snapshot with Class with illegal cid for an event struct such as native_window_event_t, when an app registers listeners only on desktop platforms. Native callbacks now receive their struct payloads as Pointer<Void>, working around dart-lang/sdk#50540 (#26).
  • Windows: closing a window whose close request a listener approved asynchronously no longer crashes the Dart VM with Dart_EnterIsolate expects there to be no current isolate. Acknowledging an event now resolves its vote from the main loop, so the approved close no longer runs, and tears down the Flutter engine, inside native_event_delivery_complete (window_manager#593).
  • Linux: keep the hidden-title-bar shadow gutter transparent when KDE injects high-priority GTK styles (window_manager#594).
  • Linux: use the current GTK allocation when updating a shadow input region, so the right and bottom content edges remain clickable after resize (window_manager#595).

0.5.10 #

  • Linux: fix mouse input remaining limited to the old shadow rectangle after restoring the title bar and enlarging a window (nativeapi-core#90).
  • Document Flutter size conversions with toNative() and toSize().

0.5.9 #

  • Windows: switching between tray icons keeps working when the application runs elevated, because every icon stays registered with the shell and visibility is toggled with NIS_HIDDEN (tray_manager#110).

0.5.8 #

  • Include the Linux build fix for GLib older than 2.74, including Ubuntu 22.04 (nativeapi-core#89).

0.5.7 #

  • Include the macOS 12 native-library loading fix by weak-linking ServiceManagement (#20, nativeapi-core#87).

0.5.6 #

  • Add asynchronous shortcut registration requests with request IDs, cancellation and scoped pending-request cleanup across interpreter restarts.

  • Support native Wayland GlobalShortcuts Portal sessions, desktop-selected binding descriptions, activation/release notifications and resource cleanup on denial, cancellation or service loss. Host application identity and a working desktop provider are required.

  • Support macOS Play/Pause and other media shortcuts in global and application scope, with down/up delivery, autorepeat handling, independent scope cleanup, focus recovery and permission-loss cleanup. Global media taps require OS authorization; ordinary Carbon shortcuts retain their existing permission behavior.

0.5.5 #

  • Add explicit frameless window mode with alias-shared state and property events; title-bar changes restore the frame while shadow preferences stay independent.
  • Expose the macOS native window-server number for interoperability. Keep nativeapi window IDs unchanged.
  • Separate macOS zoom policy from resizability and preserve explicit programmatic maximize/restore. Ignore Windows frame dragging/resizing in fullscreen and dispatch it on the native owner thread.

0.5.4 #

  • Preserve desktop native shortcut keycodes, Windows native repeat behavior and Linux CapsLock modifiers. Reject conflicting X11 grabs safely and retain overlapping lock-state registrations.

  • Implement Windows/Linux native caption-group visibility without changing individual button policies; preserve updates through fullscreen. Disabling the Windows close command keeps the other caption buttons. Keep application content header bars intact on Linux.

  • Preserve Linux fullscreen and minimize requests made before the first GTK map, including cancellation and the requested width after leaving initial fullscreen.

  • Allow a new close request after a completed veto while its native rejection reply is queued, preserving onWindowClose callbacks that call destroy().

  • Add native Windows desktop-toolbar docking with shared state, dock/undock events and automatic reservation cleanup, plus reversible vertical maximization.

  • Add Linux X11 exclusive keyboard grabs with ownership checks and release on hide or native destruction; Wayland reports the capability as unsupported.

  • Add macOS window-frame animation and independent full-screen-space visibility. Preserve other collection-behavior flags when changing workspace visibility.

  • Fix macOS restored events after re-subscribing while a window is maximized. Preserve Linux maximize requests made before a GTK window is first mapped.

  • Restore top/bottom resize-handle double-click vertical maximization in DragToResizeArea.

0.5.3 #

  • Windows: an elevated application's tray icon receives clicks again (leanflutter/tray_manager#110); template icons also follow system theme changes while elevated. Window events are delivered on the thread that owns the windows (libnativeapi/nativeapi#18).

  • Confirm HarmonyOS immersive-layout requests against the real SDK result and live layout flag on workers, reject overlapping alias requests, and cancel pending work on native destruction. Keep computer floating-main no-op and native-caption inset limits explicit.

  • Implement HarmonyOS fullscreen-mode policy with preserved floating/split bits, an explicit host override baseline and primary Stage fallback. Serialize UI/worker requests, keep policies on SDK refusal, and cancel pending requests on native destruction. The SDK couples fullscreen and maximize; unknown child policy queries return false.

  • Use native HarmonyOS fullscreen modes for eligible freeform child windows, restore their previous maximized/floating state and report confirmed SDK state through C++/C queries and fullscreen events. Preserve phone SDK layout restrictions.

  • Implement HarmonyOS custom title-bar double-click actions through public SDK maximize/recover, including eligible SDK children. Check live free-window support to reject phone SDK no-op success, respect applied maximize policies and invalid modes, reject overlapping requests and cancel pending work on native destruction; UI submissions are asynchronous and workers wait for SDK completion.

  • Implement independent HarmonyOS minimize/maximize/close caption-button policies, composed with collective visibility and title-bar styles, with C++/C property events. These affect caption buttons only: native title-bar double-click can still maximize, and primary programmatic Close retains its existing restriction.

  • Recover HarmonyOS custom shadows after native helper destruction; verify primary-window rendering and decoration/default restoration on computers, and SDK refusal on phones.

  • Implement HarmonyOS custom window shadows through an optional Stage companion: core-rendered colors, blur and offset, copied C++/C configuration, click-through helpers, live geometry and visibility, clipped shapes and native closure cleanup.

  • Return transparent colors for malformed hexadecimal input without throwing; preserve combined keyboard modifiers across the C ABI.

  • Breaking (C++): retain shared windows in relative positioning strategies and expose the owning relative-window getter in all bindings. C++ callers must pass Relative(window) instead of Relative(*window).

  • Display HarmonyOS native-view tooltips from real hover events through the optional NativeTooltipHost companion. Public SDK popups preserve focus and underlying clicks; updates, clearing, hidden/disabled ancestors, removal, node replacement and ContentSlot lifecycle cancel stale presentations.

  • Implement HarmonyOS child-window reparenting through the public SDK. Read actual parent relationships, including embedding-host changes; reject cycles, invalid handles and overlapping requests, and wait for SDK completion on workers. Verify native/C behavior and real parent destruction on phone/computer simulators.

  • Query the actual HarmonyOS visible-window stack for window hit testing on workers, with nonblocking completed snapshots on UI and per-display caches. Verify focus-independent child layers, SDK raises, exclusions and destruction through C++/C on phone/computer; restore the device-information test export and rerun storage/metadata acceptance.

  • Preserve HarmonyOS Preferences removal semantics for missing keys. Share each scope's native store and serialize compound operations, closing the SDK handle only after the final owner; verify C++/C, SDK interoperability, concurrency, limits and real process persistence on phone/computer simulators.

  • Read live HarmonyOS user device names through the public Settings SDK with the documented market-name fallback. Preserve unavailable distribution names as empty, and report the process build ABI independently of the kernel machine. Verify all seven getters through ordinary C++/C UI and worker reads, real restored name changes and process restarts on phone/computer simulators.

  • Implement HarmonyOS public-NDK key press/release monitoring with shared native registration, UI delivery, stopped-epoch invalidation and guarded destruction. Both phone/computer system-app debug fixtures pass real input and C++/C lifecycle checks; normal apps remain denied even with the tested ACL. Modifier-state events and remaining permission/teardown audits stay open.

  • Read actual HarmonyOS self startup status through the public SDK on workers, with nonblocking last-completed UI snapshots. Resolve default metadata after host attachment; keep programmatic startup controls unavailable and record display names as metadata only.

  • Implement HarmonyOS application-local shortcuts through the explicit NativeShortcutHost component adapter, without probing or reserving global chords. Verify phone/computer real input, disabled states, C callback lifetime, worker registration and callback/event self-removal. Additional windows/native-only hosts and repeat/teardown audits remain open.

  • Implement HarmonyOS application metadata, native image codecs, ASSET encrypted storage and clipboard image/local-file formats. ArkTS hosts initialize nativeapi and attach UIAbilityContext explicitly.

  • Add HarmonyOS window management for initialized ArkTS hosts: main/child window lookup, asynchronous child creation, geometry, focus, visibility, full screen, native events and cancellable child closing. Host integration is explicit; Flutter does not attach WindowStage automatically.

  • macOS: add ShortcutReleasedEvent for system key-up delivery and accept Fn / CapsLock accelerators (hotkey_manager migration).

  • Add core clipboard text, HTML, images, file paths and change notifications on desktop and iOS; Android native hosts support monitoring and text/HTML through C++/JNI (no Flutter auto-initialization).

0.5.2 #

  • Requires nativeapi 0.5.2.

0.5.1 #

  • Requires nativeapi 0.5.1, which no longer leaves objects behind or crashes on a hot restart.

0.5.0 #

  • Requires nativeapi 0.5.0.

  • DragToMoveArea opens the native system window menu on a secondary click: on the release on Windows, as a native title bar does, and on the press on supporting Linux window managers, which a Wayland compositor requires.

  • MaximizeButtonArea: wrap a custom title bar's maximize button in it and Windows 11 shows the snap layouts when the pointer rests on it. The button still gets hover, press and tap; the area follows it and goes away with it.

  • package:nativeapi_flutter/windowing.dart compiles for the web too (leanflutter/tray_manager#108): there nativeWindowOf and nativeWindow return null, since no native window stands behind a controller.

  • DragToMoveArea follows the macOS title-bar double-click preference, including Minimize and None, through the native window action.

0.4.1 #

  • Requires nativeapi 0.4.1.
  • runNativeApp is not re-exported: it is for plain Dart programs, and a Flutter app's engine already runs the event loop.

0.4.0 #

  • Initial release. It re-exports package:nativeapi.
  • View, TextField and EdgeInsets from nativeapi are not re-exported, as Flutter already has widgets and a class of those names; use the native ones through a prefixed package:nativeapi/nativeapi.dart import.
  • Holds the Flutter side of nativeapi, which is now a plain Dart package: the widgets (DragToMoveArea, DragToResizeArea, DragOutArea, DropRegion, ContextMenuRegion), ImageAsset and package:nativeapi_flutter/windowing.dart moved here from nativeapi.
  • Conversions between nativeapi's Point, Size, Rectangle, Color and Brightness and dart:ui's Offset, Size, Rect, Color and Brightness.
  • The re-export of package:nativeapi leaves out Brightness, Color, Display, Image, ModifierKey, ShortcutManager and Size, which clash with Flutter's names.
4
likes
160
points
64.1k
downloads

Documentation

API reference

Publisher

verified publisherleanflutter.dev

Weekly Downloads

Flutter integration for nativeapi: widgets, dart:ui conversions and the multi-window bridge on top of package:nativeapi.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, nativeapi, path

More

Packages that depend on nativeapi_flutter