首页 > 解决方案 > 我们可以从一个 Repo 中使用多个 Flutter 插件吗?

问题描述

我被困在这一点上,我为我的新颤振应用程序实现了多个插件。但我想将所有这些插件放在一个仓库中,并将它们称为单独的插件

我的插件是

我的仓库名为flutter_plugins

如果链接到我的回购与以下类似

https://maja.azure.com/ramraj/flutter_plugins

所有插件文件夹都放在这个 repo 中

我试图在我的 Pubspec.yaml 中以类似于以下方式指出这些包

plugin_custom1:
    git:
      url: https://maja.azure.com/ramraj/flutter_pluginspath=%2Fplugin_custom1

然后我在获取包裹时遇到以下错误

(OS Error: The filename, directory name, or volume label syntax is incorrect.

提前致谢

标签: gitflutterdartflutter-plugin

解决方案


我找到了答案

plugin_custom1:
    git:
      url: https://maja.azure.com/ramraj/flutter_plugins
      path:plugin_custom1

请参考以下 Flutter 文档 https://flutter.dev/docs/development/packages-and-plugins/using-packages#dependencies-on-unpublished-packages


推荐阅读