Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix kraken.methodChannel.setMethodCallHandler did't get called before kraken.invokeMethod called. #289

Merged
merged 3 commits into from
May 8, 2021

Conversation

andycall
Copy link
Member

@andycall andycall commented May 7, 2021

Fixed #287

在之前的实现中,由于 Dart 向 JS 侧发送消息的回调函数会在 MethodChannel module 初始化的时候绑定,而 module 的设计是只有调用方法的时候才进行初始化,这就导致了在 MethodChannelModule 在初始化之前,都无法调用 JS 侧的方法。

将回调函数的绑定移动到 KrakenController 初始化阶段即可解决这个问题。

@andycall andycall requested a review from wssgcg1213 May 7, 2021 12:51
answershuto
answershuto previously approved these changes May 7, 2021
wssgcg1213
wssgcg1213 previously approved these changes May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dart代码无法直接通过 javaScriptChannel.invokeMethod 调用js方法
4 participants