Duvet generates nice-looking coverage reports for your Dart projects.
Add Duvet to your project by adding the following to your
dev_dependencies: duvet: ^1.0.0
You can also install
duvet globally with the following:
$ pub global activate duvet
Once added to a project, you can generate a coverage report by running:
$ pub run duvet:duvet_cover
If you installed
duvet globally, you can generate a report by running:
duvet will then run your tests and collect coverage, outputting the report to a
coverage directory. You can also pass the
--serve option to automatically start a webserver to access the coverage reports.
Example Report #
You can view a sample coverage report for the
dart_style package here.
How it works #
duvet works by running the
test package against your project, and then using the
coverage package to collect coverage information. It then assembles reports using
hyper, and serves the reports using
- Add executable to pubspec.yaml
- Initial version, created by Stagehand
Use this package as an executable
1. Install it
You can install the package from the command line:
$ pub global activate duvet
2. Use it
The package has the following executables:
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: duvet: ^0.0.2
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 Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
lib/src/duvet_base.dart. (-0.50 points)
lib/src/duvet_base.dart reported 1 hint:
line 65 col 20: Unnecessary new keyword.
lib/src/executable.dart. (-0.50 points)
lib/src/executable.dart reported 1 hint:
line 69 col 5:
Future results in
async function bodies must be
awaited or marked
Maintenance issues and suggestions
Support latest dependencies. (-10 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 1 dependency (
Package is getting outdated. (-14.52 points)
The package was last published 59 weeks ago.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
duvet.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of
0.0.*, it might mean that the author is still experimenting with the general direction of the API.
|Dart SDK||>=2.1.0 <3.0.0|