flutter集成到原生框架

已经安装flutter的情况下

1、到你flutter的路径下面

我自己的路径   cd ~/development

2、将flutter工具添加到您的路径

export PATH="$PATH:`pwd`/flutter/bin"

3、检查环境并向终端窗口显示报告flutter doctor

4、到你要创建的文件夹路径

我自己的 cd /Users/laoyanqiao/Desktop/dddd 

5、创建flutter模块 flutter create --template module my_flutter

6、用VScode打开该模块运行查看是否正确

7、打开在同一文件夹下面用xcode创建好的项目。该项目安装cocopods

8、打开Podflie 设置如下


platform :ios, '10.0'

flutter_application_path = '../my_flutter'

load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

target "appBlendDemo" do

install_all_flutter_pods(flutter_application_path)

end

target "appBlendDemoTests" do

这个是要下载的第三方库

pod 'MJRefresh'

pod 'Masonry'

pod 'AFNetworking'

end

终端pod install

9、下载完成后打开xcode项目xcworkspace

10、继承完成

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容