我有一个主项目文件夹名称foundation,在该文件夹中我们有两个文件夹,一个是flutter应用程序名称myapp,另一个文件夹名称是submodules,可能有多个flutter模块并希望在myapp中使用flutter模块。
我通过运行命令克隆了子模块
farahanaansari foundation % git submodule add https://github.com/xyz/qpf_core.git submodules/qpf_core
我的文件夹结构
像这样使用本地子模块但无法导入模块文件
在
pubspec.yaml
你应该尝试这个:
...
qp_mobile_app_foundation:
path: ../submodules/qpf_core
...