flutter/docs/contributing/Setting-up-the-Framework-development-environment.md
Kate Lovett 1fbcbb73a0
[wiki migration] Leftover wiki pages and links (#148989)
This is waiting on 
- https://github.com/flutter/flutter/pull/148777
- https://github.com/flutter/flutter/pull/148790

After this PR lands, there will likely be 1-2 more clean up PRs, after which the migration will be done!

---

This moves the remaining wiki pages as planned in [flutter.dev/go/migrate-flutter-wiki-spreadsheet](https://docs.google.com/spreadsheets/d/1x65189ZBdNiLRygpUYoU08pwvXD4M-Z157c6pm8deGI/edit?usp=sharing) 

It also adds the team labels to the label bot for future PRs.

Changes to the content were only updating cross links, or links to refer to the main branch rather than master.
Remaining links to the wiki will be updated once all other pages have finished moving, they still work in the meantime.

Part of https://github.com/flutter/flutter/issues/145009
2024-05-28 15:12:10 +00:00

3.5 KiB

Preqrequisites

  • 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 (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)

Set up your environment

  1. 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 git@github.com:flutter/flutter.git
    • HTTPS: git clone https://github.com/flutter/flutter.git
  2. Change into the directory of the cloned repository and rename the origin remote to upstream:

    1. cd flutter
    2. git remote rename origin upstream
  3. Fork the flutter/flutter repo into your own GitHub account.

  4. 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 git@github.com:████████/flutter.git
    • HTTPS: git remote add origin https://github.com/████████/flutter.git
  5. Verify the upstream and origin repository you've specified for your clone.

    • git remote -v
  6. Add the repo's bin directory to your PATH: e.g. on UNIX, using export 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.
  7. 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: