Were can I find "flutter pub list" or "flutter pub search" command line tools?

Viewed 1977

Where can I find a command line tool for searching and listing installed packaged versions and available upgrade versions?

I can't think of any other package management tool that doesn't include commands to list installed versions or find available upgrades without actually upgrading.

For example, if my pubspec.yaml restricts a version, there is no easy way to check which of my pinned packages could be upgraded if I lift the restriction. Similarly, it might be possible to see what versions of a particular package may be available at the command line.

I'd prefer to use a command line tool because it is a vastly faster workflow than needing to check a website for every package you might be using or have inherited via a dependency.

3 Answers

You can use flutter pub deps command to list all package information including their versions.

On May 6, the command flutter pub outdated has been introduced with the release of Dart 2.8. It shows the current and upgradable versions of the packages imported.

If it doesn't work, update your Flutter version with flutter upgrade.

The Dart package manager is a very limited in functionality software product (this is a well-known fact).
For this reason, you may not find the functionality that you expect from such software.

Related