Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

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

Learn more

Flutter 3.41 is live! Check out theFlutter 3.41 blog post!

flutter: The Flutter command-line tool

The reference page for using 'flutter' in a terminal window.

Theflutter command-line tool is how developers (or IDEs on behalf of developers) interact with Flutter. For Dart related commands, you can use thedart command-line tool.

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

flutter create my_appcd my_appflutter analyzeflutter testflutter run lib/main.dart

To runpub commands using theflutter tool:

flutter pub getflutter pub outdatedflutter pub upgrade

To view all commands thatflutter supports:

flutter --help --verbose

To get the current version of the Flutter SDK, including its framework, engine, and tools:

flutter --version

flutter commands

#

The following table shows which commands you can use with theflutter tool:

CommandExample of useMore information
analyzeflutter analyze -d <DEVICE_ID> Analyzes the project's Dart source code.
Use instead ofdart analyze .
assembleflutter assemble -o <DIRECTORY>Assemble and build flutter resources.
attachflutter attach -d <DEVICE_ID>Attach to a running application.
bash-completionflutter bash-completionOutput command line shell completion setup scripts.
buildflutter build <DIRECTORY>Flutter build commands.
channelflutter channel <CHANNEL_NAME>List or switch flutter channels.
cleanflutter cleanDelete thebuild/ and.dart_tool/ directories.
configflutter config --build-dir=<DIRECTORY>Configure Flutter settings. To remove a setting, configure it to an empty string.
createflutter create <DIRECTORY>Creates a new project.
custom-devicesflutter custom-devices listAdd, delete, list, and reset custom devices.
devicesflutter devices -d <DEVICE_ID>List all connected devices.
doctorflutter doctorShow information about the installed tooling.
downgradeflutter downgradeDowngrade Flutter to the last active version for the current channel.
driveflutter driveRuns Flutter Driver tests for the current project.
emulatorsflutter emulatorsList, launch and create emulators.
gen-l10nflutter gen-l10n <DIRECTORY>Generate localizations for the Flutter project.
installflutter install -d <DEVICE_ID>Install a Flutter app on an attached device.
logsflutter logsShow log output for running Flutter apps.
precacheflutter precache <ARGUMENTS>Populates the Flutter tool's cache of binary artifacts.
pubflutter pub <PUB_COMMAND> Works with packages.
Use instead ofdart pub .
runflutter run <DART_FILE>Runs a Flutter program.
screenshotflutter screenshotTake a screenshot of a Flutter app from a connected device.
symbolizeflutter symbolize --input=<STACK_TRACK_FILE>Symbolize a stack trace from the AOT compiled flutter application.
testflutter test [<DIRECTORYDART_FILE>] Runs tests in this package.
Use instead ofdart test .
upgradeflutter upgradeUpgrade your copy of Flutter.

For additional help on any of the commands, enterflutter help <command> or follow the links in theMore information column. You can also get details onpub commands — for example,flutter help pub outdated.

Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-10-28.View source orreport an issue.


[8]ページ先頭

©2009-2026 Movatter.jp