Home > Mobile >  How to use a specific commit in flutter app?
How to use a specific commit in flutter app?

Time:05-12

I forked a package from GitHub and had several commits on it. I want to use a specific commit in a project. How to use a specific commit in my project.

CodePudding user response:

See Package dependencies > Dependency sources > Git packages in the Dart docs:

dependencies:
  kittens:
    git:
      url: [email protected]:munificent/kittens.git
      ref: some-branch

The ref can be anything that Git allows to identify a commit.

So you can write your commit hash as the value for ref: to use that specific commit.

  • Related