CHAPTER 6

image

Using the Dart Pub Package Manager

In this Chapter we’ll see what the Dart Pub Package Manager is, how to use it, and how it can help you in your Dart projects. We’ll create a new application and we will add an external dart package to see how Pub works. We’ll also learn how to use pubspec.yaml files and the basic pub commands. Later we’ll show you all the available Pub commands and what those commands can do.

What is Pub?

Pub is the package manager for Dart. It is the tool will let us add any library written by other developer to our applications in a very simple way. Pub automatically resolves dependencies and will keep us updated ...

Get Web Programming with Dart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.