Git Product home page Git Product logo

Comments (5)

foxsofter avatar foxsofter commented on August 26, 2024

FlutterEngine上有,最好的方式还是像原来一样放在 plugin 的 registerWithRegistrar 方法中

from flutter_thrio.

sunimp avatar sunimp commented on August 26, 2024

FlutterEngine上有

我刚看到可以通过:

[ThrioModule init:self];
FlutterEngine *engine = [ThrioNavigator getEngineByEntrypoint:@""];

这样来拿到引擎,不过我没有尝试自己创建一个引擎,然后用 FlutterMethodChannel 去注册,我接下来试试,感谢

from flutter_thrio.

sunimp avatar sunimp commented on August 26, 2024

FlutterEngine上有,最好的方式还是像原来一样放在 plugin 的 registerWithRegistrar 方法中

我刚尝试了拿到 thrio 创建的 flutter 引擎:

FlutterEngine *engine = [ThrioNavigator getEngineByEntrypoint:@""];

尝试调用下边的方法让 ThrioChannel_methodHandlers就绪

[channel setupMethodChannel:engine.messenger];

但这个 channel 似乎并未生效,我在thrio里断点追踪调试一下看看问题在哪里

from flutter_thrio.

sunimp avatar sunimp commented on August 26, 2024

FlutterEngine上有,最好的方式还是像原来一样放在 plugin 的 registerWithRegistrar 方法中

找到了!
ThrioChannel 里对 methodName 搞了个前缀 _method_...
🤣

from flutter_thrio.

sunimp avatar sunimp commented on August 26, 2024

使用原本的 FlutterMethodChannel 注册是可以的,我的问题解决了,感谢,我关闭了这个 issue。

from flutter_thrio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.