Skip to content

Commit

Permalink
Updated Flutter SDK install steps
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone committed Aug 16, 2023
1 parent 1891262 commit ab2f51d
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 68 deletions.
76 changes: 23 additions & 53 deletions src/_includes/docs/install/flutter-doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,78 +2,47 @@

{% include docs/help-link.md location='win-doctor' %}

### Run Flutter Doctor

{% if include.os == 'Windows' -%}

1. Open PowerShell.

{% assign path='C:\src\flutter' %}
{% assign terminal='PowerShell' %}
{% assign prompt1='C:>' %}
{% assign prompt2=path | append: '>' %}
{% elsif include.os == "macOS" -%}

1. Open the Terminal.

{% assign path='~/Applications/flutter' %}
{% assign terminal='the Terminal' %}
{% assign prompt1='$' %}
{% assign prompt2='$' %}
{% else -%}
{% assign path='/usr/bin/flutter' %}
{% assign terminal='a shell' %}
{% assign prompt1='$' %}
{% assign prompt2='$' %}
{% endif -%}

1. Open a shell.
### Run Flutter Doctor

{% endif -%}
1. Open {{terminal}}.

1. Navigate to your Flutter installation directory.

You set this in your `PATH` environment variable.

{% if include.os == 'Windows' -%}

This example installed Flutter in `c:\src\flutter`.

```batchfile
C:\> cd C:\src\flutter
C:\src\flutter>
```

{% elsif include.os == "macOS" -%}

This example installed Flutter in `~/Applications/flutter`.

```terminal
$ cd ~/Applications/flutter
```

{% else -%}

This example installed Flutter in `/usr/bin/flutter`.
This example installed Flutter in `{{path}}`.

```terminal
$ cd /usr/bin/flutter
{{prompt1}} cd {{path}}
{{prompt2}}
```

{% endif -%}

The Flutter directory is now your working directory.
The Flutter directory `{{path}}` is now your working directory.

1. To verify your installation of all the components,
run the following command.

{% if include.os == 'Windows' -%}

```batchfile
C:\src\flutter> flutter doctor -v
```

{% elsif include.os == "macOS" -%}

```terminal
$ flutter doctor -v
{{prompt2}} flutter doctor -v
```

{% else -%}

```terminal
$ flutter doctor -v
```

{% endif -%}

The `flutter doctor` command validates that all components of a
complete Flutter development environment for {{include.os}}.

Expand All @@ -95,12 +64,13 @@ The `flutter doctor` should report success for the following components:
Android toolchain
VS Code

{% elsif include.platform == 'desktop' %}
{% elsif include.platform == 'mobile' %}

Visual Studio
VS Code

{% else include.platform == 'desktop' %}
{% else include.platform == 'web' %}



{% endif %}
Expand Down
16 changes: 14 additions & 2 deletions src/_includes/docs/install/flutter/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@
{:.no_toc}

{% assign os = include.os %}
{% assign osl = include.os | downcase %}
{% if os == 'Windows' -%}
{% assign unzip='Extract-Archive' %}
{% elsif os == "macOS" -%}
{% assign unzip='unzip' %}
{% else -%}
{% assign unzip='unzip' %}
{% endif -%}

1. Download the following installation bundle to get the latest
{{site.sdk.channel}} release of the Flutter SDK:

[(loading...)](#){:.download-latest-link-{{os}}.btn.btn-primary}
[(loading...)](#){:.download-latest-link-{{osl}}.btn.btn-primary}

For other release channels, and older builds,
check out the [SDK archive][].

1. Extract the zip file.

```terminal
{{unzip}} [(loading...)](#){:.download-latest-link-{{osl}}}
```

1. Move the contained `flutter` directory
to where you want to store the Flutter SDK.

Expand All @@ -37,7 +49,7 @@
To run Flutter commands in PowerShell,
add Flutter to the `PATH` environment variable.

1. In the **Start** search bar, type `env``.
1. In the **Start** search bar, type `env`.

1. Select **Edit environment variables for your account**.

Expand Down
90 changes: 88 additions & 2 deletions src/_includes/docs/install/flutter/vscode.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
### Use VS Code to install Flutter
{:.no_toc}

1. To open the Command Palette,
#### Start Flutter install
{:.no_toc}

1. Login to GitHub.

1. To open the Command Palette,
press <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>.

1. In the Command Palette, type `flutter`.
Expand All @@ -17,4 +22,85 @@
This option sends you the Flutter install page if you have not installed
Git for Windows as directed in the [development tools prerequisites][].

[development tools prerequisites]: #development-tools
#### Download the Flutter SDK
{:.no_toc}

1. Choose which folder to install Flutter
using the **Select Folder for Flutter SDK** dialog.

VS Code places you in your user profile to start.
Choose a different location.

1. Click **Clone Flutter**.

While downloading Flutter, a notification displays:

```terminal
Downloading the Flutter SDK. This may take a few minutes.
```

1. Once it finishes downloading Flutter, the **Output** panel displays.

```terminal
Checking Dart SDK version...
Downloading Dart SDK from the Flutter engine ...
Expanding downloaded archive...
```

When successful, a notification displays:

```terminal
Initializing the Flutter SDK. This may take a few minutes.
```

While initializing, the **Output** panel displays the following:

```terminal
Building flutter tool...
Running pub upgrade...
Resolving dependencies...
Got dependencies.
Downloading Material fonts
Downloading Gradle Wrapper
Downloading package sky_engine
Downloading flutter_patched_sdk tools...
Downloading flutter_patched_sdk_product tools...
Downloading windows-x64 tools...
Downloading windows-x64/font-subset tools...
```

This process also runs `flutter doctor -v`. Ignore this output.

When the Flutter install succeeds, a notification displays:

```terminal
Do you want to add the Flutter SDK to PATH so it's accessible
in external terminals?
```

1. Click **Add SDK to PATH**.

When successful, a notification displays:

```terminal
The Flutter SDK was added to your PATH
```

1. The notification displays the Google Analytics notice.

If you agree, click **OK**.

### Troubleshoot Flutter install
{:.no_toc}

If you receive the following error, you need to login to your GitHub account,
then try again.

```terminal
Failed to clone Flutter: Cloning into 'flutter' ... fatal: unable
to access 'https://github.com/flutter/flutter.git/': Could not resolve
host: github.com.
```

[development tools prerequisites]: #development-tools
9 changes: 4 additions & 5 deletions src/_includes/docs/install/reqs/windows/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ your {{include.os}} environment must meet these requirements:

### Hardware requirements

Your Flutter development environment must meet the following minimum hardware
requirements. The optimal requirements are recommended.
Your {{include.os}} Flutter development environment must meet the following
minimal hardware requirements.

<div class="table-wrapper" markdown="1">
| Requirement | Minimum | Optimal |
| Requirement | Minimum | Recommended |
|:-----------------------------|:------------------------------------------------------------------------:|:-------------------:|
| x86_64 CPU Cores | 4 | 8 |
| Memory in GB | 8 | 16 |
| Display resolution in pixels | WXGA (1366 x 768) | FHD (1920 x 1080) |
| Free disk space in GB | {% include docs/install/reqs/windows/storage.md target=include.target %} |
{:.table.table-striped}
| Free disk space in GB | {% include docs/install/reqs/windows/storage.md target=include.target %}
</div>

### Software requirements
Expand Down
9 changes: 5 additions & 4 deletions src/_includes/docs/install/reqs/windows/storage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{% if include.target == 'desktop' -%}
4.0 | 52.0
4.0 | 52.0 |
{% elsif include.target == 'mobile' -%}
10.0 | 10.0
10.0 | 10.0 |
{% elsif include.target == 'web' -%}
2.5 | 2.5
2.5 | 2.5 |
{% else -%}
11.0 | 60.0
11.0 | 60.0 |
{% endif -%}
{:.table.table-striped}
4 changes: 2 additions & 2 deletions src/get-started/install/windows/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ next:

{% include docs/install/reqs/windows/base.md target='web' os='Windows' %}

{% include docs/install/flutter-sdk.md target='mobile' os='Windows' %}
{% include docs/install/flutter-sdk.md target='web' os='Windows' %}

{% include docs/install/flutter-doctor.md target='mobile' os='Windows' %}
{% include docs/install/flutter-doctor.md target='web' os='Windows' %}

0 comments on commit ab2f51d

Please sign in to comment.