Dart provides reusable code as packages, that is shared by other applications.
It provides package manager tools (pub) to manage the packages, use in your dart applications.
Dart packages contain classes and functions.
Install packages in Dart
To use a package in other applications, first define the dependency in pubspec.yaml.
pub package manager
pub is a package manager for Dart and Flutter
If there is any changes to package, will release a new version, publish it.
Once new version is updated to pubspec.yaml, You can upgrade to new version
pub getcommand in terminal, It updates pubspec.lock file, install the latest version of package.
- Another way, calling
pub upgradecommand: It updates most stable version,