how to resolve the runtime warning: channel sent a message from native to Flutter on a…
- User
how to resolve the runtime warning: channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
codestatic std::unique_ptr<NodeBaseEventChannelHandler> eventHandler; // it will be initialized somehow, no need to check null void sendMessage() { std::thread([]() { /* how to send message like eventHandler->postMessage in this non-platform thread correctly, where this thread is not possible for a join? */ }); } Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.