Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Package Managers  ›  Lesson

Choosing a Package on pub.dev

pub.dev 12 minpub.dev is the official repository of Dart and Flutter packages, and each package page shows signals such as likes, pub points, downloads, supported platforms and the publisher that help you judge it before depending on it.

Choosing a Package on pub.dev

Sprout needs to send a notification when a plant is due. You could write that yourself for Android and iOS, or reuse a package that thousands of apps already rely on. pub.dev is where Dart and Flutter packages are published. Adding one takes seconds; picking the right one takes a minute of judgement.

The rule

Check platform, health and publisher before popularity.

Every package page on pub.dev shows signals at the top:

  • Platform tags: Android, iOS, Web, Windows, macOS, Linux. If a platform you ship on is missing, stop there.
  • Pub points: a score from automated checks on documentation, code analysis, platform support and up-to-date dependencies.
  • Likes and downloads: how many developers use or appreciate it.
  • Publisher: a verified publisher, shown with a badge and a domain, tells you who stands behind the package.
  • Versions and changelog: recent releases suggest it is maintained.
  • The Example, Installing and Versions tabs, plus a link to the source repository and its issues.

Some packages are also marked Flutter Favorite, a label given to packages the Flutter team recommends for quality.

A package page also says whether it is a Dart package (works anywhere Dart runs) or a Flutter plugin (contains platform code, so a full rebuild is needed after adding it).

The shortcut

Run the checks in the order that eliminates candidates fastest.

Choosing a notifications package for SproutStep 1 of 4
  1. Platforms

    Sprout ships on Android and iOS. A package tagged only for Android is out.

The trap is picking the package with the most likes. Popularity can outlive maintenance, and a well-liked package is no help if it does not support iOS.

Drills

Answer fast — trust the rule.

quick drill

Sprout ships on iOS. A package has thousands of likes but only an Android tag. Use it?

quick drill

What do pub points measure?

quick drill

What does a verified publisher badge tell you?

quick drill

After adding a Flutter plugin with native code, what is needed?

Remember

  • Check platform, health and publisher before popularity.
  • Order of checks: platforms, health, publisher and licence, then the example.
  • Trap: choosing by likes alone.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainPick a notification package

Sprout needs local notifications on Android and iOS. You find two packages on pub.dev. Describe the checks you would make on each package page before choosing, and explain why the number of likes alone is not enough.