package_resolver 1.0.4

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 99

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.

1.0.4

  • Set max SDK version to <3.0.0, and adjust other dependencies.

1.0.3

  • Update SDK version.
  • Stop using deprecated UTF8 constant.

1.0.2

  • Don't crash on URIs without path components.

1.0.1

  • Internal changes only.

1.0.0

  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  package_resolver: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:package_resolver/package_resolver.dart';
  
Version Uploaded Documentation Archive
1.0.4 Jul 20, 2018 Go to the documentation of package_resolver 1.0.4 Download package_resolver 1.0.4 archive
1.0.3 May 25, 2018 Go to the documentation of package_resolver 1.0.3 Download package_resolver 1.0.3 archive
1.0.2 Aug 24, 2016 Go to the documentation of package_resolver 1.0.2 Download package_resolver 1.0.2 archive
1.0.1 Aug 8, 2016 Go to the documentation of package_resolver 1.0.1 Download package_resolver 1.0.1 archive
1.0.0 Jul 21, 2016 Go to the documentation of package_resolver 1.0.0 Download package_resolver 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
99
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: Flutter, other

Primary library: package:package_resolver/package_resolver.dart with components: isolate.

Suggestions

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use package_resolver.dart.

Fix lib/src/current_isolate_resolver.dart.

Analysis of lib/src/current_isolate_resolver.dart reported 1 hint:

line 31 col 42: 'packageRoot' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.37.0 <3.0.0
collection ^1.9.0 1.14.11
http ^0.11.0 0.11.3+17
package_config >=0.1.0 <2.0.0 1.0.5
path ^1.0.0 1.6.2
Transitive dependencies
async 2.0.8
charcode 1.1.2
http_parser 3.1.3
source_span 1.4.1
string_scanner 1.0.3
typed_data 1.1.6
Dev dependencies
shelf ^0.7.0
stack_trace ^1.9.2
test ^1.2.0