【问题标题】:How to use a specific commit of dependency packages in Flutter application?如何在颤振应用程序中使用特定提交?
【发布时间】:2022-06-25 17:55:29
【问题描述】:

我从 GitHub 分叉了一个包,并在上面进行了几次提交。我想在项目中使用特定的提交。如何在我的项目中使用特定的提交。

【问题讨论】:

    标签: git flutter


    【解决方案1】:

    请参阅 Dart 文档中的 Package dependencies > Dependency sources > Git packages

    dependencies:
      kittens:
        git:
          url: git@github.com:munificent/kittens.git
          ref: some-branch
    

    引用可以是 Git 允许 identify a commit 的任何内容。

    因此您可以将您的提交哈希写为 ref: 的值以使用该特定提交。

    【讨论】:

      【解决方案2】:

      另一种方式是这样的:

        flutter_cool_card_swiper:
          git:
            url: https://github.com/esmaeil-ahmadipour/flutter_cool_card_swiper
      

      【讨论】:

        猜你喜欢
        • 2019-11-03
        • 2018-11-07
        • 2018-12-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-08-13
        • 2019-07-23
        • 1970-01-01
        相关资源
        最近更新 更多