-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
251 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,76 @@ | ||
If you're using Debian/Ubuntu on AMD64 (64-bit Intel), you can choose one of the | ||
following options, both of which can update the SDK automatically when new | ||
versions are released. | ||
|
||
* [Install using apt-get](#install-using-apt-get) | ||
* [Install a Debian package](#install-a-debian-package) | ||
|
||
#### Install using apt-get | ||
### System requirements | ||
{: .no_toc} | ||
|
||
Perform the following **one-time setup**: | ||
Dart supports the following hardware architectures and platform versions | ||
to develop and run Dart code on Linux. | ||
|
||
```terminal | ||
$ sudo apt-get update | ||
$ sudo apt-get install apt-transport-https | ||
$ wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg | ||
$ echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list | ||
``` | ||
#### Hardware architecture | ||
{: .no_toc} | ||
|
||
Dart supports 32-bit and 64-bit CPUs based on Intel and ARM | ||
(IA32, ARM, x64, and ARM64). | ||
Dart also supports RISC-V for its dev and beta channel releases. | ||
|
||
#### Operating system flavor and version | ||
{: .no_toc} | ||
|
||
Dart supports the [Debian stable][] and [Ubuntu LTS][] under standard support. | ||
|
||
### Install using package manager | ||
{: .no_toc} | ||
|
||
Choose to install either using [apt-get](#install-using-apt-get) | ||
or downloading a [`.deb`](#install-a-debian-package) package. | ||
|
||
Both methods trigger an SDK update whenever Dart releases a new version. | ||
|
||
#### Install using `apt-get` | ||
{: .no_toc} | ||
|
||
Perform the following steps for the first install only. | ||
|
||
1. Update the package index files and install the secure HTTP package. | ||
|
||
Then install the Dart SDK: | ||
```terminal | ||
$ sudo apt-get update && sudo apt-get install apt-transport-https | ||
``` | ||
|
||
1. Download and add the Google Linux GPG public key. | ||
|
||
```terminal | ||
$ wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg | ||
``` | ||
|
||
1. Add the Dart package repository to your Linux system. | ||
|
||
```terminal | ||
$ echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list | ||
``` | ||
|
||
Install the Dart SDK using [`sudo`][sudo]. | ||
|
||
```terminal | ||
$ sudo apt-get update | ||
$ sudo apt-get install dart | ||
$ sudo apt-get update && sudo apt-get install dart | ||
``` | ||
|
||
#### Install a Debian package | ||
|
||
Alternatively, download Dart SDK [as a Debian package](#){:.debian-link-stable} | ||
in the `.deb` package format. | ||
To install the Dart SDK as a Debian package (`*.deb`). | ||
|
||
1. Download the Dart SDK as a [Debian package](#){:.debian-link-stable}. | ||
|
||
1. Install the `*.deb` package using one of two methods: | ||
|
||
* From a GUI, double-click the `.deb` file. | ||
|
||
* From a terminal, run the following command: | ||
|
||
```terminal | ||
$ sudo dpkg -i dart_3.2.6-1_amd64.deb | ||
``` | ||
|
||
[sudo]: https://www.sudo.ws/ | ||
[Debian stable]: https://www.debian.org/releases | ||
[Ubuntu LTS]: https://wiki.ubuntu.com/Releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,81 @@ | ||
[Install Homebrew,](https://brew.sh) | ||
and then run the following commands: | ||
|
||
### System requirements | ||
{: .no_toc} | ||
|
||
Dart supports the following hardware architectures and platform versions | ||
to develop and run Dart code on macOS. | ||
|
||
#### Hardware architecture | ||
{: .no_toc} | ||
|
||
Dart supports 64-bit CPUs based on Intel and ARM: x64 and ARM64. | ||
|
||
#### Operating system | ||
{: .no_toc} | ||
|
||
Dart supports the latest three major versions of macOS. | ||
|
||
As of November 2023, these include macOS 12 (Monterey), macOS 13 (Ventura), | ||
and macOS 14 (Sonoma). | ||
|
||
### Install using Homebrew | ||
{: .no_toc} | ||
|
||
To install the Dart SDK, use [Homebrew][]. | ||
|
||
Install Homebrew, then run the following commands. | ||
|
||
```terminal | ||
$ brew tap dart-lang/dart | ||
$ brew install dart | ||
``` | ||
|
||
{{site.alert.important}} | ||
Make sure the **Homebrew `bin` directory is in your `PATH`**. | ||
### Verify PATH includes Homebrew | ||
{: .no_toc} | ||
|
||
Verify that your `PATH` includes the **Homebrew `bin`. | ||
Setting up the path correctly makes it easier to use Dart SDK commands | ||
such as `dart run` and `dart format`. | ||
For help configuring your path, | ||
such as `dart run` and `dart format`. | ||
For help configuring your path, | ||
consult the [Homebrew FAQ.](https://docs.brew.sh/FAQ) | ||
{{site.alert.end}} | ||
|
||
### Upgrade using Homebrew | ||
{: .no_toc} | ||
|
||
To upgrade when a new release of Dart is available: | ||
|
||
```terminal | ||
$ brew upgrade dart | ||
``` | ||
|
||
To switch between locally installed Dart releases, | ||
first install the version you want to switch to if you haven't. | ||
For example, to install Dart 2.12: | ||
### Switch Dart versions | ||
{: .no_toc} | ||
|
||
```terminal | ||
$ brew install [email protected] | ||
``` | ||
To switch between locally installed Dart releases: | ||
|
||
Then to switch between versions, | ||
unlink the current version and link the desired version. | ||
1. Install the version to which you want to switch. | ||
|
||
```terminal | ||
$ brew unlink dart@<old> && brew unlink dart@<new> && brew link dart@<new> | ||
``` | ||
For example, to install Dart 3.1: | ||
|
||
```terminal | ||
$ brew install [email protected] | ||
``` | ||
|
||
1. To switch between versions, | ||
unlink the current version and link the desired version. | ||
|
||
```terminal | ||
$ brew unlink dart@<old> && brew unlink dart@<new> && brew link dart@<new> | ||
``` | ||
|
||
### List installed Dart versions | ||
{: .no_toc} | ||
|
||
To see which versions of Dart you've installed: | ||
|
||
```terminal | ||
$ brew info dart | ||
``` | ||
|
||
[Homebrew]: https://brew.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Dart tools may send usage metrics and crash reports to Google. | ||
By downloading the Dart SDK, you agree to the | ||
Dart tools might send usage metrics and crash reports to Google. | ||
If you download the Dart SDK, you agree to the | ||
[Google Terms of Service.](https://policies.google.com/terms) | ||
Note: The [Google Privacy Policy](https://policies.google.com/privacy) | ||
describes how data is handled in this service. | ||
To learn how Dart handles this data, | ||
consult the [Google Privacy Policy](https://policies.google.com/privacy). | ||
|
||
To control the submission of metrics, use the following options on the | ||
To toggle data collection, use the following options on the | ||
[`dart` tool](/tools/dart-tool): | ||
|
||
* `--enable-analytics`: Enables anonymous analytics. | ||
* `--disable-analytics`: Disables anonymous analytics. | ||
* To enable anonymous analytics, run `dart --enable-analytics`. | ||
* To disable anonymous analytics, run `dart --disable-analytics`. |
Oops, something went wrong.