25.iOS原生嵌入FlutterModule
Flutter Module
为了将 Flutter 嵌入原生项目,我们需要创建一个 Flutter Module
方式一:通过AS创建 Module

方式二:通过命令行创建
flutter create -t module 你的module名字比如my_module命名要符合规范

配置Podfile
flutter_application_path = 'flutter Module 路径'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'FlutterDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
end
配置完成后 pod install
Last updated
Was this helpful?