alibaba / alibaba/flutter_boost
在flutter界面A的initState中注册BoostChannel.instance.addEventListener后,从原生发送event到Flutter,当在事件中编写调用界面A中的任何方法时,均不起作用,当代码不涉及到界面A中的内容时,可以成功执行,是集成中哪里出现的问题吗?
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
removeListener =
BoostChannel.instance.addEventListener("stationListPageEvent", (key, arguments) {
filterArguments = arguments;
_showRefreshLoading();
print("_showRefreshLoading in event");
return;
});
_showRefreshLoading()是界面A中的方法,filterArguments是界面A的成员变量,多次调试,_showRefreshLoading()未调用,filterArguments也未成功赋值
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the callback registered in screen A's initState with BoostChannel.instance.addEventListener("stationListPageEvent"), using the native event and the shown _showRefreshLoading and filterArguments operations. Trace the listener and screen lifecycle to determine why the callback cannot affect screen A, then verify that both the method call and member assignment work when the issue is fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100