-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Per the embedding header's description of FlutterPlatformMessage's response_handle:
// The response handle on which to invoke
// |FlutterEngineSendPlatformMessageResponse| when the response is ready. This
// field is ignored for messages being sent from the embedder to the
// framework.
This means FlutterEngineSendPlatformMessage can't receive responses from messages sent into Flutter, which is inconsistent with the messaging APIs on mobile.
This is especially problematic given that MethodChannel eats all exceptions that happen during message processing and turns them into error responses; if it's impossible to set up a handler to receive those responses on the native side, debugging problems is very painful. (E.g., google/flutter-desktop-embedding#80 took me several unnecessary hours to debug because the type exception was being silently dropped.)