Support for working with Package Configuration files as described in the Package Configuration v2 design document.
The primary libraries are
package_config.dart: Defines the
PackageConfigclass and other types needed to use package configurations.
package_config_discovery.dart: Provides functions for reading configurations from files, and writing them back out.
The package includes deprecated backwards compatible functionality to
work with the
.packages file. This functionality will not be maintained,
and will be removed in a future version of this package.
Packageconstructor not accepting relative
- Updated to support new rules for picking
package_config.jsonover a specified
- Deduce package root from
.packagesderived package configuration, and default all such packages to language version 2.7.
- Remove accidental transitive import of
dart:iofrom entrypoints that are supposed to be cross-platform compatible.
- Based on new JSON file format with more content.
- This version includes all the new functionality intended for a 2.0.0 version, as well as the, now deprecated, version 1 functionality. When we release 2.0.0, the deprectated functionality will be removed.
- Allow parsing files with default-package entries and metadata. A default-package entry has an empty key and a valid package name as value. Metadata is attached as fragments to base URIs.
- Fix usage of SDK constants.
- Set max SDK version to <3.0.0.
- Removed unneeded dependency constraint on SDK.
- Update SDK constraint to be 2.0.0 dev friendly.
- Fix test to not write to sink after it's closed.
- Public API marked stable.
- Strong mode fixes.
- Invalid test cleanup (to keep up with changes in
- Syntax updates.
- Initial implementation.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: package_config: ^1.9.3
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.6
lib/src/package_config_impl.dart. (-1 points)
lib/src/package_config_impl.dart reported 2 hints:
line 379 col 35: DO use curly braces for all flow control structures.
line 381 col 49: DO use curly braces for all flow control structures.
lib/src/package_config_io.dart. (-0.50 points)
lib/src/package_config_io.dart reported 1 hint:
line 11 col 8: Unused import: 'discovery.dart'.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
package_config.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
The package description is too short. (-7 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.