flutter_boost 4.2.0版本 removeListener = BoostChannel.instance.addEventListener("yourEventKey", (key, arguments) { ///deal with your event here return; });

x759pob2  于 4个月前  发布在  Flutter
关注(0)|答案(3)|浏览(90)

4.2.0版本 按照文档接入,在flutter接收事件的方法,报错:
removeListener = BoostChannel.instance.addEventListener("yourEventKey", (key, arguments) {
///deal with your event here

return;
});

这个方法报错,烦请完善开发文档

efzxgjgh

efzxgjgh1#

需要返回一个Future

gab6jxml

gab6jxml2#

state.removeListener = BoostChannel.instance.addEventListener("yourEventKey", (key, arguments) {
///deal with your event here
return Future(() => null);
});

lf3rwulv

lf3rwulv3#

state.removeListener = BoostChannel.instance.addEventListener("yourEventKey", (key, arguments) {
///deal with your event here
return Future(() => null);
});

启动后,页面展示不出来

相关问题