在flutter项目中使用Flutter Git子模块

问题描述 投票:0回答:1

我有一个主项目文件夹名称foundation,在该文件夹中我们有两个文件夹,一个是flutter应用程序名称myapp,另一个文件夹名称是submodules,可能有多个flutter模块并希望在myapp中使用flutter模块。

我通过运行命令克隆了子模块

farahanaansari foundation % git submodule add https://github.com/xyz/qpf_core.git submodules/qpf_core

我的文件夹结构

像这样使用本地子模块但无法导入模块文件

flutter git git-submodules
1个回答
0
投票

pubspec.yaml
你应该尝试这个:

...
qp_mobile_app_foundation:
  path: ../submodules/qpf_core
...
© www.soinside.com 2019 - 2024. All rights reserved.