is that means that if i use a package version ^2.0.1 that means if the developer of this certain packages update his package to 3.0.0, my application, which including this package will lose it although my application is released?
\n","author":{"@type":"Person","name":"user13408251"},"upvoteCount":0,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"^2.0.1
in your pubspec.yaml and run pub get
the most recent version will be locked into pubspec.lock
- let's say your dependency has released version 2.0.4
then pubspec.lock
will contain that information. For applications it is hence recommended that you add pubspec.lock
to your version control. Subsequent pub get
will always fetch the locked 2.0.4
until you either change something in your dependencies
or run pub upgrade
. If you run pub upgrade
and the package author has release 2.3.0
this new version will be included. On the other hand if the package author releases 3.0.0
it will still not be used, because ^2.0.1
means the same as >=2.0.1 <3.0.0
Reputation:
is that means that if i use a package version ^2.0.1 that means if the developer of this certain packages update his package to 3.0.0, my application, which including this package will lose it although my application is released?
Upvotes: 0
Views: 103
Reputation: 4893
^2.0.1
in your pubspec.yaml and run pub get
the most recent version will be locked into pubspec.lock
- let's say your dependency has released version 2.0.4
then pubspec.lock
will contain that information. For applications it is hence recommended that you add pubspec.lock
to your version control. Subsequent pub get
will always fetch the locked 2.0.4
until you either change something in your dependencies
or run pub upgrade
. If you run pub upgrade
and the package author has release 2.3.0
this new version will be included. On the other hand if the package author releases 3.0.0
it will still not be used, because ^2.0.1
means the same as >=2.0.1 <3.0.0
Upvotes: 1