Skip to content

Instantly share code, notes, and snippets.

@martinloesethjensen
Last active January 19, 2020 21:58
Show Gist options
  • Save martinloesethjensen/8b53ec97834aaea2622d57ec94d3fb5e to your computer and use it in GitHub Desktop.
Save martinloesethjensen/8b53ec97834aaea2622d57ec94d3fb5e to your computer and use it in GitHub Desktop.
Useful Flutter Commands

Useful terminal commands

These are some of the useful terminal commands used when developing Flutter apps. Supported IDE's have Flutter plugins, so it's as easy as pressing a run button in the IDE.

Check Flutter version

flutter --version

Open simulator on a macOS through the terminal

open -a Simulator

Launch emulator

flutter emulators --launch [DeviceID]

Starts up the emulator, installs and opens up your Flutter app.

Check emulators

flutter emulators

If you don't know the DeviceID, you can run this to get the list of your available emulators.

Run on specific device

flutter run -d [DeviceID]

Starts the project on either an emulator or device. Depending on the specified DeviceID.

Run a build flavor on specific device

flutter run -d [DeviceID] --flavor=[flavor]

To run on Android with more that one build flavor, please specify flavor.

Check physical devices

flutter devices

If you don't know the DeviceID, you can run this to get the list of your available devices that have already been started or connected to the computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment