multi_screen_presentation 1.0.9 copy "multi_screen_presentation: ^1.0.9" to clipboard
multi_screen_presentation: ^1.0.9 copied to clipboard

A comprehensive Flutter plugin to manage presentation windows on secondary screens with customizable properties.

1.0.9 #

Fixed #

  • Int/float type mismatch (models.dart, multi_screen_presentation_method_channel.dart): x, y, width, height were sent as Dart int, but the native code read them with fl_value_get_float(), which requires FL_VALUE_TYPE_FLOAT. This triggered GLib assertion failures and silently collapsed window geometry to 0. Fixed by sending .toDouble() from Dart.
  • Unsafe native value reads (multi_screen_presentation_plugin.cc): added GetNum()/GetStr() helpers that check the FlValue type before reading (int or float, string or null), instead of asserting/crashing on mismatch. Also guards against width/height ever being 0.
  • Black window on secondary screen: the GtkWindow is now realized (gtk_widget_realize) and pumped through the event loop before the FlView/OpenGL context is created, so GTK picks the correct visual/EGL config for the target monitor.
  • Wrong Dart entrypoint on secondary windows: the plugin read the entrypoint argument but never applied it ((void)entrypoint; — dead code). Linux has no API to launch a named Dart entrypoint on a new engine, so the entrypoint is now passed as a CLI arg (fl_dart_project_set_dart_entrypoint_arguments) and main(List<String> args) in the app dispatches to presentationMain() manually.
  • MissingPluginException on secondary windows: each secondary window runs its own FlEngine, which had zero plugins registered (fl_register_plugins was only called for the main window). Added a multi_screen_presentation_plugin_set_view_created_callback() hook that my_application.cc uses to register plugins on every new secondary view.
  • Intermittent GLX BadAccess crash on window close: closeWindow destroyed the GtkWindow synchronously, racing with the engine's raster thread still using its GL context. Now shares the same safe, deferred (g_idle_add) teardown path as the native window-close (× button) handler, and properly cleans up the g_windows map in both cases (previously closeWindow left a stale/dangling entry).

Files touched #

lib/src/models.dart, lib/src/multi_screen_presentation_method_channel.dart, linux/multi_screen_presentation_plugin.cc, linux/include/multi_screen_presentation/multi_screen_presentation_plugin.h, example/linux/runner/my_application.cc, example/lib/main.dart

1.0.8 #

  • Fixed iOS build failure.
  • On macOS, plugins can now be launched in a new window.

1.0.7 #

  • iOS/SPM: Fixed a critical compilation issue (Module 'multi_screen_presentation' not found) on iOS devices and simulators when building with Flutter's Swift Package Manager (SPM) pipeline. Added the explicit source directory path mapping to Package.swift.
  • iOS/Platform Safety: Guarded native UIScreen observation listeners inside the iOS plugin lifecycle to safely degrade and prevent unnecessary background processing when initialized on non-iPad (iPhone) devices.

1.0.6 #

  • iOS (multi_screen_presentation.podspec): Fixed a syntax error on line 9 where an unterminated string literal (s.source_files) was missing its closing single quote. This typo was causing CocoaPods (pod install) to fail during the dependency analysis phase.

1.0.5 #

  • Remove the build failed in Linux.

1.0.4 #

  • In macOS remove the PrivacyInfo file for remove the warning in build.

1.0.3 #

  • Fix (Windows): Third-party Dart plugins (camera, connectivity, storage, device_info_plus, etc.) were never registered on the secondary window's Flutter engine (PresentationContentMode.liveFlutterEngine). This caused a MissingPluginException whenever one of these plugins was called from the secondary window.
  • Required action for developers: Your windows/runner/main.cpp must pass a pointer to RegisterPlugins (generated by Flutter in flutter/generated_plugin_registrant.h) to the plugin before creating the main window (show README.md for more details).
  • Change plugin description.

1.0.2 #

  • Fix: Resolved a major issue on Windows where new windows (liveFlutterEngine) were unable to run plugins. Plugins are now correctly registered with the new Flutter engine's PluginRegistrar upon creation.

1.0.1 #

  • Correcting Dart file warnings.

1.0.0 #

  • Initial release.
3
likes
160
points
552
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter plugin to manage presentation windows on secondary screens with customizable properties.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on multi_screen_presentation

Packages that implement multi_screen_presentation