September 2019
Beginner
512 pages
12h 52m
English
Now that you understand the most important role of the pubspec file in the package when developing Dart applications, you can add third-party package dependencies to your project. There are important pub commands that you can work with when adding or updating package dependencies to your project. We also need to demonstrate how to properly specify the dependency version that we are required to use.
After you start a new Dart project, either manually or by using a generator tool such as Stagehand, the first thing you must do is run the following command:
pub get
For example, the following package contains only the following pubspec file:
Additionally, it contains the pubspec contents, as follows:
name: adding_dependencies ...
Read now
Unlock full access