Appendix B. The Pub package manager

Pub is Dart’s package manager. It’s where you pull in open-sourced libraries, as well as your own. Most packages you’ll ever use are at https://pub.dartlang.org/. Here you’ll find packages published by the Flutter and Dart teams, as well as Dart community members.

Dart has a concise community. In some other languages, like JavaScript or Java, there are about 45 to 445 libraries for every possible problem you come across in your code. In Dart, the community seems to favor contributing to current packages over publishing new ones—“a rising tide lifts all boats” kind of thing. This saves time and energy and will leave you confident in the packages you’re using.

You use the packages on Pub by declaring which ...

Get Flutter in Action 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.