multi_screen_presentation 1.0.9
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,heightwere sent as Dartint, but the native code read them withfl_value_get_float(), which requiresFL_VALUE_TYPE_FLOAT. This triggered GLib assertion failures and silently collapsed window geometry to0. Fixed by sending.toDouble()from Dart. - Unsafe native value reads (
multi_screen_presentation_plugin.cc): addedGetNum()/GetStr()helpers that check theFlValuetype before reading (int or float, string or null), instead of asserting/crashing on mismatch. Also guards againstwidth/heightever being0. - Black window on secondary screen: the
GtkWindowis now realized (gtk_widget_realize) and pumped through the event loop before theFlView/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
entrypointargument 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) andmain(List<String> args)in the app dispatches topresentationMain()manually. MissingPluginExceptionon secondary windows: each secondary window runs its ownFlEngine, which had zero plugins registered (fl_register_pluginswas only called for the main window). Added amulti_screen_presentation_plugin_set_view_created_callback()hook thatmy_application.ccuses to register plugins on every new secondary view.- Intermittent GLX
BadAccesscrash on window close:closeWindowdestroyed theGtkWindowsynchronously, 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 theg_windowsmap in both cases (previouslycloseWindowleft 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 toPackage.swift. - iOS/Platform Safety: Guarded native
UIScreenobservation 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.