Skip to main content
Want to contribute? Great! You can help the Dart project in many ways, from reporting bugs to submitting code changes.

Ways to Contribute

You can help the Dart project in several ways:

Documentation Contributions

You have three options for improving documentation:
  1. Give feedback: Click the bug icon on documentation pages or create an SDK issue
  2. Contribute to websites: Help improve dart.dev via the dart-lang/site-www repo
  3. Improve API docs: Edit doc comments in the Dart SDK repo

Before You Contribute

Sign the CLA

Before we can use your code, you must sign the Google Individual Contributor License Agreement (CLA). You don’t need to sign until after your code is approved for review, but it must be done before we can merge your contribution.

Coordinate Large Changes

For larger contributions, get in touch through the Dart Issue Tracker first. Coordinating up front helps avoid frustration later.

Setting Up Your Environment

1

Install depot_tools

Install the Chromium depot_tools to work with the Dart codebase.
2

Get the source code

Use gclient to download the code. Do not use git clone directly - it won’t give you a functional environment.See Building from Source for complete instructions.

Submitting Code Changes

Using GitHub Pull Requests

While Gerrit is the primary code review system, you can submit GitHub PRs for smaller changes like documentation edits:
  1. Create a PR on GitHub
  2. The copybara-service bot automatically converts it to a Gerrit CL
  3. Find the Gerrit CL link in the bot’s comment
  4. The PR closes automatically when the CL is merged
Administrators must NEVER merge GitHub PRs directly - this breaks repository mirroring.
1

Create a branch

git new-branch <feature-name>
2

Write and commit code

# Write code
git commit
# Continue developing
git commit
3

Keep branch updated

git rebase-update
This fetches origin/main, rebases your branches, and deletes merged branches.
4

Upload for review

# Upload CL with reviewers and auto-submit
git cl upload --send-mail --r-owners --auto-submit
Attach the review URL to your issue at dartbug.com.
5

Update the CL

To update your CL after feedback:
# Make changes
git commit
# Upload updated version
git cl upload

Code Review Process

All submissions require review, including those from project members.

Getting Reviewers

# Open your CL in browser
git cl web
Ensure you have at least two reviewers who are OWNERS. Use the “ADD OWNERS” button if needed. If reviewers aren’t responsive, add reviewers from the root OWNERS file to escalate.

Submitting the Patch

For committers:
  1. Press “Submit to CQ” (Commit Queue) on dart-review.googlesource.com
  2. Monitor progress in the “Tryjobs” panel
  3. Once CQ is green, the patch merges automatically
  4. Fix any red try jobs and resubmit
For non-committers, a Dart engineer will submit on your behalf once approved.

Coding Style

Follow these style guides:

File Headers

All files must start with this header:
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Use a single year (not a range). When editing existing files, you don’t need to update the year.

Code of Conduct

We pledge to maintain an open and welcoming environment. See our code of conduct for details.

Build docs developers (and LLMs) love