force pub get to get latest from git
In your pubspec.yaml
, you can specify a particular git commit:
dependencies:
http2:
git:
url: https://github.com/dart-lang/http2.git
ref: c31df28c3cf076c9aacaed1d77f45b66bb2e01a6
Or if you specify only a branch in "ref":
dependencies:
http2:
git:
url: https://github.com/dart-lang/http2.git
ref: master
You need to force the update with flutter packages upgrade
Use
flutter packages upgrade
to get latest.
flutter packages get
only gets latests the first time and writes the resolved versions into pubspec.lock
Subsequent flutter packages get
runs then try to get the versions listed in pubspec.lock
,
while flutter packages upgrade
always ignores pubspec.lock
Run
flutter clean
and thenpub get
Ensure to update your package's version number; if the version is the same as the last commit, the package won't get updated.
run pub
upgradeif it still doesn't work you can run
pub cache repair
which reinstalls all your packages