Setting up the Framework development environment
-
Linux, Mac OS X, or Windows
-
git
(used for source version control) -
An IDE, such as Android Studio with the Flutter plugin or VS Code
-
Android platform tools
- Mac:
brew install --cask android-platform-tools
- Linux:
sudo apt-get install android-tools-adb
Verify that
adb
is in your PATH (thatwhich 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
. - Mac:
-
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):
- SSH:
git clone [email protected]:flutter/flutter.git
- HTTPS:
git clone https://github.com/flutter/flutter.git
- SSH:
-
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:
- SSH:
git remote add origin [email protected]:████████/flutter.git
- HTTPS:
git remote add origin https://github.com/████████/flutter.git
- SSH:
-
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, usingexport PATH="$PATH:$HOME/<path to flutter repository>/bin"
- If you already have a Flutter installation you will either need to remove it from your PATH, or use a full path whenever you are running
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.
- If you already have a Flutter installation you will either need to remove it from your PATH, or use a full path whenever you are running
-
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 beforeflutter 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:
- Running examples, to see if your setup works.
-
The flutter tool, to learn about how the
flutter
command line tool works. - Style guide for Flutter repo, to learn how to write code for Flutter.
- Tree hygiene, to learn about how to submit patches.
- Signing commits, to configure your environment to securely sign your commits.
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (main)
- Glossary
- Contributor Guide
- Chat on Discord
- Design documents
- Code of Conduct
- Issue triage reports (latest)
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Popular issues
- Running and writing tests
- Release process
- Flutter Framework Gardener Rotation
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems and Retrospectives
- Hotfix Documentation Best Practices
- In case of emergency
- Landing Changes With Autosubmit
- Setting up the Framework development environment
- The Framework architecture
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Managing template image assets
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Crashes
- more...
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Contributing to Plugins and Packages
- Understanding Packages tests
- Plugin Tests
- Releasing a Plugin or Package
- more...