To upgrade to a new version of the package,
for example to use new features in that package,
run flutter pub upgrade
to retrieve the highest available version of the package
that is allowed by the version constraint specified in
pubspec.yaml.
Note that this is a different command from
flutter upgrade or flutter update-packages,
which both update Flutter itself.

Dependencies on unpublished packages

Packages can be used even when not published on pub.dev.
For private packages, or for packages not ready for publishing,
additional dependency options are available:

A Flutter app can depend on a package using a file system
path: dependency. The path can be either relative or absolute.
Relative paths are evaluated relative to the directory
containing pubspec.yaml. For example, to depend on a
package, packageA, located in a directory next to the app,
use the following syntax:

    
  dependencies:
  packageA:
    path: ../packageA/