Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

dart.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more
dart: The Dart command-line tool

Dart 3.11 is live!Learn more

dart: The Dart command-line tool

Learn about the 'dart' CLI and its available subcommands.

Thedart tool is the command-line interface to theDart SDK. The tool is available no matter how you get the Dart SDK—whether you download the Dart SDK explicitly or download only theFlutter SDK.

Usage example

#

Here's how you might use thedart tool to create, analyze, test, and run an app:

dart create -t console my_appcd my_appdart analyzedart testdart run bin/my_app.dart

You can also runpub commands using thedart tool:

dart pub getdart pub outdateddart pub upgrade

Available commands

#

The following table shows which commands you can use with thedart tool.

CommandFormat of commandMore information
analyzedart analyze [<DIRECTORY|DART_FILE>]Analyzes the project's Dart source code.
Learn more.
builddart build <APP_TYPE> Builds a Dart app includingcode assets .
Learn more.
compiledart compile <FORMAT> Compiles Dart to various formats (native executable, JavaScript, WebAssembly).
Learn more.
createdart create <DIRECTORY>Creates a new project.
Learn more.
devtoolsdart devtools Opens Dart DevTools, a suite of debugging and performance tools for Dart.
Learn more.
docdart doc <DIRECTORY>Generates API reference documentation.
Learn more.
fixdart fix <DIRECTORY|DART_FILE>Applies automated fixes to Dart source code.
Learn more.
formatdart format <DIRECTORY|DART_FILE>Formats Dart source code.
Learn more.
infodart infoOutputs Dart tooling diagnostic information.
Learn more.
pubdart pub <PUB_COMMAND>Works with packages.
Replacespub.
Learn more.
rundart run <DART_FILE>Runs a Dart program.
Learn more.
testdart test <DIRECTORY|DART_FILE>Runs tests in this package.
Learn more.
(none)dart <DART_FILE>Runs a Dart program.
Preferdart run.

Learn more

#

To get help with any of the commands, rundart help <command>. You can also get details onpub commands.

dart help pub outdated
Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Dart 3.11.0. Page last updated on 2025-10-22.View source orreport an issue.


[8]ページ先頭

©2009-2026 Movatter.jp