Skip to content

Commit

Permalink
Update supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone committed Jan 30, 2024
1 parent 5ac42d8 commit e265196
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 139 deletions.
17 changes: 15 additions & 2 deletions src/_sass/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ li.card {
border-radius: 0;
color: $site-color-body;
margin-top: 1rem;
padding: 30px 30px;
padding: 1.5rem;

i.material-icons {
font-size: 20px;
Expand All @@ -569,7 +569,7 @@ li.card {
background-color: #00000010;
}

p:last-child {
p:last-child, li:last-child, ul:last-child, ol:last-child {
margin-bottom: 0;
}

Expand Down Expand Up @@ -884,3 +884,16 @@ body.obsolete {
}
}
}

/* -----------------------------------------
Headings in boxes
----------------------------------------- */

div h1:first-child,
div h2:first-child,
div h3:first-child,
div h4:first-child,
div h5:first-child,
div h6:first-child {
margin-top: 0rem;
}
83 changes: 65 additions & 18 deletions src/get-dart/_linux.md
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
73 changes: 56 additions & 17 deletions src/get-dart/_mac.md
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
65 changes: 47 additions & 18 deletions src/get-dart/_windows.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,51 @@
You can install the Dart SDK using [Chocolatey.][Chocolatey]

{{site.alert.important}}
These commands require administrator rights.
Here's one way to open a Command Prompt window
that has admin rights:
### System requirements
{: .no_toc}

1. Press <kbd>Windows+R</kbd> to open the **Run** window.
2. Type `cmd` into the box.
3. Press <kbd>Ctrl+Shift+Enter</kbd>.
{{site.alert.end}}
Dart supports the following hardware architectures and platform versions
to develop and run Dart code on Windows.

To install the Dart SDK:
#### Hardware architecture
{: .no_toc}

Dart supports 32- and 64-bit CPUs based on Intel architecture
(IA32, x64) and 64-bit CPUs based on ARM (ARM64).

#### Operating system
{: .no_toc}

Dart supports 32-bit and 64-bit Windows 10 and Windows 11.

### Install using Chocolatey
{: .no_toc}

To install the Dart SDK, use [Chocolatey][Chocolatey].
Chocolatey requires [elevated permissions].

Install Chocolatey, then run a [command prompt] with elevated permissions.

```terminal
C:\> choco install dart-sdk
```

To upgrade the Dart SDK:
### Change default install path
{: .no_toc}

By default, Chocolatey installs the SDK at `C:\tools\dart-sdk`.
To change that location, set the [`ChocolateyToolsLocation`][]
environment variable to your desired installation directory.

### Verify your PATH includes Dart
{: .no_toc}

Verify you can run Dart.

```terminal
C:\> choco upgrade dart-sdk
C:\> dart --version
Dart SDK version: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "win_x64"
```

By default, the SDK is installed at `C:\tools\dart-sdk`.
You can change that location by setting
the [`ChocolateyToolsLocation`][] environment variable
to your chosen installation directory.

If you can't use the Dart SDK executables,
If your development machine doesn't return a Dart version,
add the SDK location to your PATH:

1. In the Windows search box, type `env`.
Expand All @@ -38,5 +56,16 @@ add the SDK location to your PATH:
6. In each window that you just opened,
click **Apply** or **OK** to dismiss it and apply the path change.

### Upgrade using Chocolatey
{: .no_toc}

To upgrade the Dart SDK:

```terminal
C:\> choco upgrade dart-sdk
```

[elevated permissions]: https://www.thewindowsclub.com/elevated-privileges-windows
[command prompt]: https://www.thewindowsclub.com/how-to-run-command-prompt-as-an-administrator
[Chocolatey]: https://chocolatey.org
[`ChocolateyToolsLocation`]: https://stackoverflow.com/questions/19752533/how-do-i-set-chocolatey-to-install-applications-onto-another-drive/68314437#68314437
14 changes: 7 additions & 7 deletions src/get-dart/archive/_sdk-terms.md
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`.
Loading

0 comments on commit e265196

Please sign in to comment.