Fix response handling for unhandled method calls in flutter_window.cpp

This commit is contained in:
2025-07-20 18:47:49 +08:00
parent 9ed8f351c7
commit 2acf234f7d

View File

@@ -98,6 +98,7 @@ bool FlutterWindow::OnCreate() {
else else
result->Success(flutter::EncodableValue("No Proxy")); result->Success(flutter::EncodableValue("No Proxy"));
delete(res); delete(res);
return;
} }
#ifdef NDEBUG #ifdef NDEBUG
else if (call.method_name() == "heartBeat") { else if (call.method_name() == "heartBeat") {
@@ -107,8 +108,10 @@ bool FlutterWindow::OnCreate() {
} }
lastHeartbeat = std::chrono::steady_clock::now(); lastHeartbeat = std::chrono::steady_clock::now();
result->Success(); result->Success();
return;
} }
#endif #endif
result->Success(); // Default response for unhandled method calls
}); });
flutter::EventChannel<> channel2( flutter::EventChannel<> channel2(