Files
sdk/pkg/dartdev
Sam Rawlins 539840f91c dartdev: Simplify some JSON-parsing code; remove dead code
* In `_handleServerResponse`, use if-case with map patterns to avoid
  casts and null checks and repeatedly fetching map values.
* Remove the castStringKeyedMap utility. After some other changes,
  most call-sites passed in a Map, so then half of the utility is not
  used. In the others, it seemed simplest to use `as Map` and `.cast()`
  inline.
* Change some `dynamic` local variables to be `Object?` instead.
* Replace `DartdevCommand.project` getter and `_project` field with a
  single final field.
* Remove unused properties from `Project` and unused `PackageConfig`
  class.
* Remove associated tests.

Change-Id: I1f626ecc0e6e4d27ef24f65959fd4cb54fb5fc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412980
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-28 14:54:14 -08:00
..
2023-10-26 14:13:43 +00:00
2025-01-20 10:37:34 -08:00
2025-01-06 08:35:42 -08:00

Dart CLI tooling

A command-line utility for Dart development.

Usage: dart <command|dart-file> [arguments]

Global options:
-v, --verbose               Show additional command output.
    --version               Print the Dart SDK version.
    --enable-analytics      Enable analytics.
    --disable-analytics     Disable analytics.
    --suppress-analytics    Disallow analytics for this `dart *` run without changing the analytics configuration.
-h, --help                  Print this usage information.

Available commands:
  analyze    Analyze Dart code in a directory.
  compile    Compile Dart to various formats.
  create     Create a new Dart project.
  devtools   Open DevTools (optionally connecting to an existing application).
  doc        Generate API documentation for Dart projects.
  fix        Apply automated fixes to Dart source code.
  format     Idiomatically format Dart source code.
  info       Show diagnostic information about the installed tooling.
  pub        Work with packages.
  run        Run a Dart program.
  test       Run tests for a project.

Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.

Contributing

If you'd like to contribute to the Dart CLI tool, please start by reading the contribution guidelines for the Dart project. Then familiarize yourself with the design principles that guide this tool's UX.

Features and bugs

Please file feature requests and bugs in the Dart SDK issue tracker with label area-dart-cli.