diff --git a/src/_includes/docs/install/flutter-doctor.md b/src/_includes/docs/install/flutter-doctor.md index f795a65730e..decafc1c156 100644 --- a/src/_includes/docs/install/flutter-doctor.md +++ b/src/_includes/docs/install/flutter-doctor.md @@ -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}}. @@ -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 %} diff --git a/src/_includes/docs/install/flutter/download.md b/src/_includes/docs/install/flutter/download.md index 54b91a09b2a..a05029aadc0 100644 --- a/src/_includes/docs/install/flutter/download.md +++ b/src/_includes/docs/install/flutter/download.md @@ -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. @@ -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**. diff --git a/src/_includes/docs/install/flutter/vscode.md b/src/_includes/docs/install/flutter/vscode.md index 8cae503bf4c..6d67e7ef8a6 100644 --- a/src/_includes/docs/install/flutter/vscode.md +++ b/src/_includes/docs/install/flutter/vscode.md @@ -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 Control + Shift + P. 1. In the Command Palette, type `flutter`. @@ -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 \ No newline at end of file +#### 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 diff --git a/src/_includes/docs/install/reqs/windows/base.md b/src/_includes/docs/install/reqs/windows/base.md index dc644e9b4f1..5a71c9c318e 100644 --- a/src/_includes/docs/install/reqs/windows/base.md +++ b/src/_includes/docs/install/reqs/windows/base.md @@ -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.