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)
9
9
# https://github.com/flutter/flutter/issues/57146.
10
10
set (WRAPPER_ROOT "${EPHEMERAL_DIR} /cpp_client_wrapper" )
11
11
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
+
12
17
# === Flutter Library ===
13
18
set (FLUTTER_LIBRARY "${EPHEMERAL_DIR} /flutter_windows.dll" )
14
19
@@ -91,7 +96,7 @@ add_custom_command(
91
96
COMMAND ${CMAKE_COMMAND} -E env
92
97
${FLUTTER_TOOL_ENVIRONMENT}
93
98
"${FLUTTER_ROOT} /packages/flutter_tools/bin/tool_backend.bat"
94
- windows-x64 $< CONFIG>
99
+ ${FLUTTER_TARGET_PLATFORM} $< CONFIG>
95
100
VERBATIM
96
101
)
97
102
add_custom_target (flutter_assemble DEPENDS
Original file line number Diff line number Diff line change @@ -92,9 +92,11 @@ WindowManagerPlugin::WindowManagerPlugin(
92
92
93
93
WindowManagerPlugin::~WindowManagerPlugin () {
94
94
registrar->UnregisterTopLevelWindowProcDelegate (window_proc_id);
95
+ channel = nullptr ;
95
96
}
96
97
97
98
void WindowManagerPlugin::_EmitEvent (std::string eventName) {
99
+ if (channel == nullptr ) return ;
98
100
flutter::EncodableMap args = flutter::EncodableMap ();
99
101
args[flutter::EncodableValue (" eventName" )] =
100
102
flutter::EncodableValue (eventName);
You can’t perform that action at this time.
0 commit comments