如果使用Andorid studio 创建项目,会很卡,所以我们通过命令创建
flutter create -t plugin helloword 创建一个helloword项目.这时候会默认使用swift 和kotlin作为主要语言.
先看android 项目的
image.png
如果Flutter通过Channel会回调到onMethodCall方法。
看下IOS项目的.
image.png在HellowordPlugin.m 文件里面进行了注册
image.png
如果使用Andorid studio 创建项目,会很卡,所以我们通过命令创建
flutter create -t plugin helloword 创建一个helloword项目.这时候会默认使用swift 和kotlin作为主要语言.
先看android 项目的
如果Flutter通过Channel会回调到onMethodCall方法。
看下IOS项目的.
image.png在HellowordPlugin.m 文件里面进行了注册
本文标题:Flutter 插件编写
本文链接:https://www.haomeiwen.com/subject/huobdktx.html
网友评论