Linux, macOS, or Windows
git
(used for source version control)
An IDE, such as Android Studio with the Flutter plugin or VS Code
Android platform tools
brew install --cask android-platform-tools
sudo apt-get install android-tools-adb
Verify that adb
is in your PATH (that which adb
prints sensible output).
If you're also working on the Flutter engine, you can use the copy of the Android platform tools in .../engine/src/third_party/android_tools/sdk/platform-tools
.
Python (used by some of our tools)
Clone the flutter/flutter repo using either SSH or HTTPS (SSH is recommended, but requires a working SSH key on your GitHub account):
git clone git@github.com:flutter/flutter.git
git clone https://github.com/flutter/flutter.git
Change into the directory of the cloned repository and rename the origin remote to upstream:
cd flutter
git remote rename origin upstream
Fork the flutter/flutter repo into your own GitHub account.
Add your fork as the origin remote to your local clone either using SSH or HTTPS (SSH is recommended, but requires a working SSH key on your GitHub account) by replacing ████████ with your GitHub account name:
git remote add origin git@github.com:████████/flutter.git
git remote add origin https://github.com/████████/flutter.git
Verify the upstream and origin repository you've specified for your clone.
git remote -v
Add the repo's bin
directory to your PATH: e.g. on UNIX, using export PATH="$PATH:$HOME/<path to flutter repository>/bin"
flutter
in this repository. If you have version solving errors when trying to run examples below, you are running a version of Flutter other than the one checked out here.flutter update-packages
This will recursively fetch all the Dart packages that Flutter depends on. If version solving failed, try git fetch upstream
to update Flutter versions before flutter update-packages
.
Tip If you plan on using IntelliJ as your IDE, then also run
flutter ide-config --overwrite
to create all of the IntelliJ configuration files so you can open the main flutter directory as a project and run examples from within the IDE.
Next steps:
flutter
command line tool works.