将原生 SDK(用于 IOS 和 Android)包含到 flutter 中

Including a native SDK (for IOS and Android) into flutter

我目前面临以下问题,希望有人能帮助我:

我想在 Flutter 中编写一个应用程序(是的,我已经将此框架与 React Native 和 Ionic 等其他框架进行了比较)但我需要包含 motiontag SDK,这就是问题开始的地方。 Motion Tag SDK仅适用于原生App描述性原生编程语言(Java/Kotlin,Swift).

有没有办法将 SDK 包含在 flutter 中?? 喜欢一些解决方法!

谢谢你帮我!

Flutter 确实通过 Platform Channels, so if the sdk is just function calls you could call the function from flutter/dart , and then let the platform channel handle the call to the native function with arguments. If the sdk it's about rendering UI inside flutter then it's more complicated but it's possible as long as you use the boundaries of PlatformView 与 native 通信。所有为flutter开发的native plugins都使用这两种方式来处理native code/UI