Skip to main content

Search #

Query expressions #

pub.dev supports the following search query expressions:

  • "exact phrase": By default, when you perform a search, the results include packages with similar phrases. When a phrase is inside quotes, you'll see only those packages that contain exactly the specified phrase.

  • package:<prefix>: Searches for packages that begin with prefix. Use this feature to find packages in the same framework.

  • dependency:<package_name>: Searches for packages that reference package_name in their pubspec.yaml.

  • dependency*:<package_name>: Searches for packages that depend on package_name (as direct, dev, or transitive dependencies).

  • topic:<topic-name>: Searches for packages that have specified the topic-name topic.

  • publisher:<publisher-name.com>: Searches for packages published by publisher-name.com.

  • sdk:<sdk>: Searches for packages that support the given SDK. sdk can be either flutter or dart.

  • platform:<platform>: Searches for packages that support the given platform. platform can be one of android, ios, linux, macos, web, and windows.

  • runtime:<runtime>: Searches for packages that support the given runtime. runtime can be one of web, native-jit, and native-aot.

  • license:<license>: Searches for packages with a specific license. Use license:osi-approved for packages with OSI approved licenses, or use an SPDX license identifier (such as license:bsd-3-clause or license:mit).

  • is:<tag>: Searches for packages with a specific property:

    • is:flutter-favorite: Packages in the Flutter Favorites program.
    • is:plugin: Flutter plugin packages.
    • is:swiftpm-plugin: Flutter plugins supporting Swift Package Manager.
    • is:wasm-ready: Packages compatible with WebAssembly (dart compile wasm).
    • is:dart3-compatible: Packages compatible with Dart 3.
    • is:null-safe: Packages that support null safety.
    • is:unlisted: Packages marked as unlisted.
    • is:legacy: Legacy packages that support only Dart SDK 1.x.
  • has:<tag>: Searches for packages that include specific content or metadata:

    • has:executable: Packages with Dart files in their bin/ directory.
    • has:screenshot: Packages that display screenshots on pub.dev.
    • has:funding-link: Packages that specify funding links in their pubspec.yaml.
    • has:topic: Packages that specify at least one topic in their pubspec.yaml.
  • show:unlisted: Includes unlisted, discontinued, and legacy packages in search results.

  • updated:<duration>: Searches for packages updated in the given past days, with the following recognized formats: 3d (3 days), 2w (two weeks), 6m (6 months), 2y (2 years).

Negating tags (-) #

Tag expressions (sdk:, platform:, runtime:, license:, is:, has:, topic:, and publisher:) can be negated by prefixing them with - to exclude matching packages from search results. For example:

  • -is:plugin: Excludes Flutter plugins.
  • -platform:web: Excludes packages that support the web platform.

Note that package:, dependency:, dependency*:, updated:, and free-text search terms cannot be negated.

Filters #

The search UI also supports filters. On a wide screen, the filter options will appear to the left of the search results. On a non-wide screen, to open the filter options, click the filter icon to the right of the search bar.

  • To filter by Dart or Flutter support, expand the SDKs section, then select the SDK you are developing with.

  • To filter by platform, under the Platforms section, select all platforms you intend to support.

  • To filter for only packages with OSI approved licenses, expand the License section, then select OSI approved.

  • For other filters, such as including unlisted packages, expand the Advanced section.

Ranking #

When you search for a package, the search algorithm first applies filters, and then considers only the packages that aren’t filtered out and that match the search query. Because packages contain a lot of text (including documentation comments and identifiers from source code), common words can match many packages.

To find the most relevant search results, the algorithm ranks packages using a combination of the following parameters, listed in order of relative importance:

  • Search query relevance of the following:

    • Package name
    • Description
    • README
    • Documentation comments and identifiers
  • Package download count and like count

  • Pub points, which are based on factors such as these:

    • Adherence to Dart file conventions
    • Presence of documentation
    • Up-to-date dependencies
    • Language feature support

These parameters are normalized, weighted for relative importance, and combined to form an overall score for each search result; this score determines the default order of the displayed search results.

The code for normalizing and weighting parameters changes occasionally. You can find it at github.com/dart-lang/pub-dev.

Legacy packages #

pub.dev does not expose packages that support only Dart SDK 1.x in search results or in listing pages. However, one can access these packages through their package page (/packages/<pkg>) and pub client can download them.

To search for such packages, include is:legacy in the search query.

⌂ Proxy