File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
99# https://github.com/flutter/flutter/issues/57146.
1010set (WRAPPER_ROOT "${EPHEMERAL_DIR} /cpp_client_wrapper" )
1111
12+ # Set fallback configurations for older versions of the flutter tool.
13+ if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
14+ set (FLUTTER_TARGET_PLATFORM "windows-x64" )
15+ endif ()
16+
1217# === Flutter Library ===
1318set (FLUTTER_LIBRARY "${EPHEMERAL_DIR} /flutter_windows.dll" )
1419
@@ -91,7 +96,7 @@ add_custom_command(
9196 COMMAND ${CMAKE_COMMAND} -E env
9297 ${FLUTTER_TOOL_ENVIRONMENT}
9398 "${FLUTTER_ROOT} /packages/flutter_tools/bin/tool_backend.bat"
94- windows-x64 $<CONFIG>
99+ ${FLUTTER_TARGET_PLATFORM} $<CONFIG>
95100 VERBATIM
96101)
97102add_custom_target (flutter_assemble DEPENDS
Original file line number Diff line number Diff line change @@ -92,9 +92,11 @@ WindowManagerPlugin::WindowManagerPlugin(
9292
9393WindowManagerPlugin::~WindowManagerPlugin () {
9494 registrar->UnregisterTopLevelWindowProcDelegate (window_proc_id);
95+ channel = nullptr ;
9596}
9697
9798void WindowManagerPlugin::_EmitEvent (std::string eventName) {
99+ if (channel == nullptr ) return ;
98100 flutter::EncodableMap args = flutter::EncodableMap ();
99101 args[flutter::EncodableValue (" eventName" )] =
100102 flutter::EncodableValue (eventName);
You can’t perform that action at this time.
0 commit comments