Skip to content

Commit

Permalink
Updated SDK install, flutter doctor sections
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone committed Aug 15, 2023
1 parent efd9cb4 commit c7a7014
Show file tree
Hide file tree
Showing 12 changed files with 205 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/_includes/docs/install/compiler/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

</div>

<div class="tab-pane active" id="physical" role="tabpanel" aria-labelledby="physical-tab" markdown="1">
<div class="tab-pane" id="physical" role="tabpanel" aria-labelledby="physical-tab" markdown="1">

{% include docs/install/devices/android-physical.md %}

Expand Down
13 changes: 0 additions & 13 deletions src/_includes/docs/install/devices/android-emulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@ follow these steps:

The **Virtual Device Configuration** dialog displays.

- In older versions of Android Studio, go to **Tools**
<span aria-label="and then">></span> **Android**
<span aria-label="and then">></span> **AVD Manager**.

Click **Create Virtual Device...**.
The **Android** submenu appears only when inside an Android project.

- If you do not have a project open, you can choose
<span class="material-icons-outlined">
more_vert
</span> (**More Actions**) <span aria-label="and then">></span>
**Virtual Device Manager** and select **Create Device...**

1. Select either **Phone** or **Tablet** under **Category**.

1. Select a device definition. You can browse or search for the device.
Expand Down
84 changes: 76 additions & 8 deletions src/_includes/docs/install/flutter-doctor.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,110 @@
## Check your Flutter development install
## Check your development setup

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

### Run Flutter Doctor

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

1. Open PowerShell.

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

1. Open the Terminal.

{% else -%}

1. Open a shell.

{% endif -%}

1. Navigate to your Flutter installation directory.

You set this in your `PATH` environment variable.

1. Run the following command to verify your installation.
{% 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`.

```terminal
$ cd /usr/bin/flutter
```

{% endif -%}

The Flutter directory is now your working directory.

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

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

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

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

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

{% else -%}
{% else -%}

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

{% endif -%}

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

As you chose to develop for {{include.target}},
you do not need _all_ components.
You can ignore the following warnings:

### Troubleshoot Flutter Doctor issues

The `flutter doctor` command reports on the status of
your Flutter development environment.
Check the output for other software you might need to install
or further tasks to perform.

The `flutter doctor` should report success for the following components:

{% if include.platform == 'desktop' %}

Android toolchain
VS Code

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

Visual Studio
VS Code

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


{% endif %}

```terminal
[-] Android toolchain - develop for Android devices
• Android SDK at D:\Android\sdk
Expand Down
33 changes: 33 additions & 0 deletions src/_includes/docs/install/flutter-sdk.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
## Install the Flutter SDK

To install the Flutter SDK, you can use the Flutter plugin
within VS Code or download and install the Flutter bundle.

{% comment %} Nav tabs {% endcomment -%}
<ul class="nav nav-tabs" id="flutter-install" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="vscode-tab" href="#vscode" role="tab" aria-controls="vscode" aria-selected="true">Use VS Code to install</a>
</li>
<li class="nav-item">
<a class="nav-link" id="download-tab" href="#download" role="tab" aria-controls="download" aria-selected="false">Download and install</a>
</li>
</ul>

{% comment %} Tab panes {% endcomment -%}
<div class="tab-content">

<div class="tab-pane active" id="vscode" role="tabpanel" aria-labelledby="vscode-tab" markdown="1">

{% include docs/install/flutter/vscode.md os=include.os %}

</div>

<div class="tab-pane" id="download" role="tabpanel" aria-labelledby="download-tab" markdown="1">

{% include docs/install/flutter/download.md os=include.os %}

</div>
</div>
{% comment %} End: Tab panes. {% endcomment -%}

If you have installed all prerequisites and the Flutter SDK,
you should be able to start developing Flutter on
{{include.os}} for {{include.target}}.
56 changes: 56 additions & 0 deletions src/_includes/docs/install/flutter/download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### Download then install Flutter
{:.no_toc}

{% assign os = include.os %}

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}

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

1. Extract the zip file.

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

{{site.alert.warning}}
Do not install Flutter to a directory or path that meets
one or both of the following conditions:

- The path contains special characters or spaces.
- The path requires elevated privileges.

As an example, `C:\Program Files\` fails both conditions.
You could use `%USERPROFILE%\flutter` or `D:\dev\flutter`.
{{site.alert.end}}

[SDK archive]: {{site.url}}/release/archive

### Update your Windows PATH variable
{:.no_toc}

{% include docs/help-link.md location='win-path' section='#unable-to-find-the-flutter-command' %}

To run Flutter commands in PowerShell,
add Flutter to the `PATH` environment variable.

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

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

1. Under **User variables** check for the **Path** entry.

* If the entry exists, prepend the full path to `flutter\bin`
followed with a semicolon (`;`) to separate the new value from
existing values.

* If the entry doesn't exist,
create a new user variable named **Path**.

Set its value to the full path to `flutter\bin`.

1. For these changes to take effect,
close and reopen any existing command prompts and PowerShell instances.
20 changes: 20 additions & 0 deletions src/_includes/docs/install/flutter/vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Use VS Code to install Flutter
{:.no_toc}

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

1. In the Command Palette, type `flutter`.

1. Select **Flutter: New Project**.

1. VS Code prompts you to locate the Flutter SDK on your computer.

1. If you have the Flutter SDK installed, click **Locate SDK**.

1. If you do not have the Flutter SDK installed, click **Download SDK**.

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
3 changes: 2 additions & 1 deletion src/_includes/docs/install/reqs/windows/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ Download and install the Windows version of the following packages:

- [Git for Windows][] {{site.appmin.github_win}} or later to manage source code.
- [Visual Studio Code][] {{site.appmin.vscode}} or later
to edit and debug Flutter code.
and the [Flutter extension][] to edit and debug Flutter code.
{% include docs/install/reqs/windows/software.md target=include.target %}

Flutter doesn't support any of these packages.
To troubleshoot installation issues, consult that product's documentation.

[Visual Studio Code]: https://code.visualstudio.com/docs/setup/windows
[Flutter extension]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[Windows PowerShell]: https://docs.microsoft.com/powershell/scripting/install/installing-windows-powershell
[Git for Windows]: https://gitforwindows.org/
3 changes: 2 additions & 1 deletion src/_sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ dd {

.install-help {
text-align: right;
margin-top: -2.5rem;

a {
display: inline-flex;
Expand Down Expand Up @@ -274,7 +275,7 @@ summary {
margin-bottom: 1rem;
}

ol + img, ul + img, ol + p, ul + p, p + p + img {
ol + img, ul + img, ol + p, ul + p, p + p + img, ul + p:last-child {
margin-bottom: 1rem;
}

Expand Down
1 change: 1 addition & 0 deletions src/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ document.addEventListener("DOMContentLoaded", function(_) {
setupTabs($('#vscode-to-android-studio-setup'), 'dev.flutter.debug.vscode-to-as');
setupTabs($('#vscode-to-vs-setup'), 'dev.flutter.debug.vscode-to-vs');
setupTabs($('#android-devices-vp'), 'dev.flutter.install.android-devices-vp');
setupTabs($('#flutter-install'), 'dev.flutter.install.options');

setupTabs($('#ios-versions'), 'dev.flutter.ios-versions');

Expand Down
7 changes: 6 additions & 1 deletion src/get-started/install/windows/desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ title: Start building Flutter native desktop apps on Windows
description: Configure your system to develop Flutter desktop apps on Windows.
short-title: Windows Desktop app
platform: desktop
next:
title: Create a test app
path: /get-started/test-drive
---

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

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

{% include docs/install/flutter-doctor.md target='desktop' os='Windows' platform='desktop' %}
3 changes: 3 additions & 0 deletions src/get-started/install/windows/mobile.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: Start building Flutter Android apps on Windows
description: Configure your system to develop Flutter mobile apps on Windows.
short-title: Android app
next:
title: Create a test app
path: /get-started/test-drive
---

{% include docs/install/reqs/windows/base.md target='mobile' os='Windows' %}
Expand Down
5 changes: 5 additions & 0 deletions src/get-started/install/windows/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
title: Start building Flutter web apps on Windows
description: Configure your system to develop Flutter web apps on Windows.
short-title: Web app
next:
title: Create a test app
path: /get-started/test-drive
---

{% 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-doctor.md target='mobile' os='Windows' %}

0 comments on commit c7a7014

Please sign in to comment.