如何在windows桌面上使用Flatter的eventchannel?

如何在windows桌面上使用Flatter的eventchannel?,windows,flutter,Windows,Flutter,我想使用事件通道通知颤振,但我找不到任何关于桌面(windows)事件通道的示例。方法通道是双工模式,dart通过“通道”+“功能”调用本机功能,类似地,本机通过相同的方式调用dart功能 1、 使用cmd: flutter create -t plugin --platforms=linux,macos,windows window_to_front 2、 查找函数: RegisterWithRegistrar channel->InvokeMethod("foo"

我想使用事件通道通知颤振,但我找不到任何关于桌面(windows)事件通道的示例。

方法通道是双工模式,dart通过“通道”+“功能”调用本机功能,类似地,本机通过相同的方式调用dart功能

1、 使用cmd:

flutter create -t plugin --platforms=linux,macos,windows window_to_front
2、 查找函数:

RegisterWithRegistrar
channel->InvokeMethod("foo", nullptr, nullptr)
3、 在“RegisterWithRegister”功能中使用“channel”:

RegisterWithRegistrar
channel->InvokeMethod("foo", nullptr, nullptr)
4、 在dart中注册“通道”和“功能”: