Clone this repo:
  1. f03ff4f support package:http version 0.12.x (#20) by Jacob MacDonald · 4 months ago master 1.0.6
  2. d979abc use conditional imports to avoid dart:io imports on the web (#19) by Jacob MacDonald · 4 months ago 1.0.5
  3. 3cbc7cd chore: set max SDK version to <3.0.0 (#15) by Patrice Chalin · 6 months ago 1.0.4
  4. 286f165 dartfmt by Kevin Moore · 7 months ago
  5. 26798c3 Merge pull request #14 from dart-lang/dart-2 by Natalie Weizenbaum · 8 months ago

A package that defines a common class, PackageResolver, for defining how to resolve package: URIs. This class may be based on the current isolate's package resolution strategy, but it may also be explicitly defined by the user—for example, you could create a resolver that represents the strategy used to compile a .dart.js file.

The Dart VM provides two mutually exclusive means of resolving package: URIs: a package spec and a package root.

  • A package spec usually comes in the form of a .packages file on the filesystem. It defines an individual root URL for each package name, so that package:$name/$path resolves to $root/$path.

  • A package root is a single URL that acts as the base for all package: URIs, so that package:$name/$path resolves to $base/$name/$path.

This normalizes access to these resolution schemes, and makes it easy for code to resolve package URIs no matter where the resolution information comes from.