Ways You Can Contribute
You can help the Dart project in many ways, in addition to contributing code:- Report bugs to help improve the SDK
- Ask and answer Dart questions on StackOverflow
- Improve the documentation
- Contribute code fixes and new features
Documentation Contributions
If you’d like to improve the documentation, you have three options:-
Give us feedback:
- If you’re looking at a page with a bug icon at the upper right, click that icon to report a bug on the page
- To report an API doc bug, create an SDK issue
- Contribute to Dart developer websites such as dart.dev (repo: dart-lang/site-www). For more information, see Writing for Dart and Flutter websites
- Improve API reference docs at api.dart.dev by editing doc comments in the Dart SDK repo. For more information, see Effective Dart: Documentation
Before You Contribute
Sign the CLA
Before we can use your code, you must sign the Google Individual Contributor License Agreement (CLA). The CLA is necessary because you own the copyright to your changes, even after your contribution becomes part of our codebase.You don’t have to sign the CLA until after you’ve submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase.
Contributions made by corporations are covered by the Software Grant and Corporate Contributor License Agreement.
Coordinate Large Contributions
Before you start working on a larger contribution, you should get in touch with us first through the Dart Issue Tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on.Setting Up Your Environment
Install depot_tools
In order to submit a patch from a local workspace, you need to install the Chromium depot_tools.
Get the source code
To work with the Dart code, you need to download and build the development branch. Active development takes place on the
main branch.Complete instructions are found at Getting The Source.Create a new branch
Create a new branch using You can be in any branch when you run
git new-branch (a command added by depot_tools):git new-branch.Keeping Your Branch Updated
As you work, and before you send a patch for review, ensure your branch is merging cleanly toorigin/main.
We recommend using git rebase-update (a feature added by depot_tools):
- Fetch
origin/main - Rebase all your open branches
- Delete cleanly merged branches
Submission Methods
All submissions, including submissions by project members, require review. We use the same code-review tools and process as the Chromium project.GitHub Pull Requests
This repository primarily uses Gerrit for code reviews, rather than GitHub PRs. However, you may submit a GitHub PR, e.g. to edit some API documentation.GitHub PRs are automatically converted into a Gerrit change list (a “CL”) by a copybara-service bot. You can find the link to that CL as a comment left on the PR by the bot. The PR will be automatically closed when the CL is reviewed and landed.
Gerrit Code Review
The main flow is to use the Gerrit review system. See the Code Review Workflow page for detailed instructions.Coding Style
The source code of Dart follows: You should familiarize yourself with those guidelines.File Headers
All files in the Dart project must start with the following header:The year should be a single number (not a range). If you edit an existing file, you don’t have to update the year.