美文网首页
Flutter 插件编写

Flutter 插件编写

作者: 代瑶 | 来源:发表于2020-08-13 15:28 被阅读0次

    如果使用Andorid studio 创建项目,会很卡,所以我们通过命令创建
    flutter create -t plugin helloword 创建一个helloword项目.这时候会默认使用swift 和kotlin作为主要语言.

    image.png

    先看android 项目的


    image.png

    如果Flutter通过Channel会回调到onMethodCall方法。

    看下IOS项目的.

    image.png

    在HellowordPlugin.m 文件里面进行了注册


    image.png

    相关文章

      网友评论

          本文标题:Flutter 插件编写

          本文链接:https://www.haomeiwen.com/subject/huobdktx.html