Installing the package
To install the package as a dev dependency run
$ dart pub add --dev dart_code_metrics
# or for a Flutter package
$ flutter pub add --dev dart_code_metrics
OR
add it manually to pubspec.yaml
pubspec.yaml
environment:
sdk: '>=2.18.0 <3.0.0'
dev_dependencies:
dart_code_metrics: ^5.5.0
and then run
$ dart pub get
# or for a Flutter package
$ flutter pub get
Usage
Analyzer plugin
To use Dart Code Metrics as a plugin to the Dart analyzer refer to the Analyzer Plugin documentation section.
CLI
To use Dart Code Metrics as a command-line tool refer to the Command Line Interface documentation section.
Library
To use Dart Code Metrics as a library refer to this example.