DartEditor automatically calls pub get when the pubspec.yaml file is pubspec.yaml .
You can call it manually (for example, when, for example, you checked a project from GitHub without changing any file)
- using the
pub get context menu in DartEditor in the pubspec.yaml file - by invoking
pub get at a command prompt in the package directory where the pubspec.yaml file is pubspec.yaml .
pub get downloads the version of the package specified in the pubspec.lock file (in the root directory of the package), or the latest version that matches your version restriction ( 0.0.1 in your example could be any for 'most recent') if pubspec.lock does not exist. pub get / pub upgrade create a pubspec.lock file if it does not already exist and save the versions of downloaded packages that it just downloaded.
Check for package updates and download them using
pub upgrade context menu in DartEditor in pubspec.yaml filepub upgrade at a command prompt in the package directory where the pubspec.yaml file is pubspec.yaml .
pub upgrade downloads the latest version that meets your version restrictions and saves the downloaded version in the pubspec.lock file.
pub get / pub upgrade prefers stable releases (version numbers that do not contain - ), such as 0.0.1 or 1.2.0+1 over preliminary releases, such as 0.0.2-1 or 1.2.1-1 , if any which fulfills your version restriction.
If you need a pre-release, you need to tighten the version limit so that only the pre-release will comply with your restrictions (e.g. angular: '>=1.2.1' )
pub upgrade can show output like
analyzer 0.10.5 (9 new versions available)
This means that there are 9 pre-release versions available that are newer than the loaded stable build.
The version limit for your dependency should match the version restrictions of all dependency dependencies (for example, if you add observe and polymer dependencies, where polymer depends on observe itself).
You can force pub get / pub upgrade version that breaks dependency dependency by defining a dependency with a version constraint in dependencies_override: instead of dependencies: in pubspec.yaml .
You can also add dev_dependencies (e.g. unittest ) that load only when they are defined in your package, but are ignored when they are defined in only one of your dependencies.
You see, this is an advanced topic even for experienced Dart developers.