diff --git a/sites/docs/firebase.json b/sites/docs/firebase.json index 18b3ade953..a77613dd7a 100644 --- a/sites/docs/firebase.json +++ b/sites/docs/firebase.json @@ -163,7 +163,7 @@ { "source": "/cookbook/testing/widget-test-tap-drag", "destination": "/cookbook/testing/widget/tap-drag", "type": 301 }, { "source": "/deployment/fastlane-cd", "destination": "/deployment/cd#fastlane", "type": 301 }, { "source": "/get-started", "destination": "/install", "type": 301 }, - { "source": "/get-started/custom", "destination": "/install/custom", "type": 301 }, + { "source": "/get-started/custom", "destination": "/install", "type": 301 }, { "source": "/get-started/codelab", "destination": "/learn/pathway", "type": 301 }, { "source": "/get-started/codelab-web", "destination": "/learn", "type": 301 }, { "source": "/get-started/editor", "destination": "/tools/editors", "type": 301 }, @@ -182,6 +182,8 @@ { "source": "/get-started/uninstall", "destination": "/install/uninstall", "type": 301 }, { "source": "/get-started/web", "destination": "/platform-integration/web/building", "type": 301 }, { "source": "/get-started/quick", "destination": "/install/quick", "type": 301 }, + { "source": "/install/custom", "destination": "/install", "type": 301 }, + { "source": "/install/with-vs-code", "destination": "/install/quick", "type": 301 }, { "source": "/ios-14", "destination": "/platform-integration/ios/ios-debugging", "type": 301 }, { "source": "/ios-project-migration", "destination": "https://web.archive.org/web/20220614103526/https://docs.flutter.dev/development/ios-project-migration", "type": 301 }, { "source": "/layout", "destination": "/ui/layout", "type": 301 }, diff --git a/sites/docs/lib/_sass/components/_header.scss b/sites/docs/lib/_sass/components/_header.scss index 2370c1e21e..4ce36a3925 100644 --- a/sites/docs/lib/_sass/components/_header.scss +++ b/sites/docs/lib/_sass/components/_header.scss @@ -73,15 +73,6 @@ } } - #call-to-action { - padding: 0.5rem 1rem; - display: none; - - @media (min-width: 1024px) { - display: unset; - } - } - #header-search { display: none; position: relative; diff --git a/sites/docs/lib/src/components/layout/header.dart b/sites/docs/lib/src/components/layout/header.dart index 001483e668..7bc9f2b8af 100644 --- a/sites/docs/lib/src/components/layout/header.dart +++ b/sites/docs/lib/src/components/layout/header.dart @@ -5,7 +5,6 @@ import 'package:jaspr/dom.dart'; import 'package:jaspr/jaspr.dart'; import 'package:jaspr_content/jaspr_content.dart'; -import 'package:site_shared/components/common/button.dart'; import 'package:site_shared/components/common/material_icon.dart'; import 'package:site_shared/components/layout/menu_toggle.dart'; import 'package:site_shared/components/layout/site_switcher.dart'; @@ -108,14 +107,6 @@ class DashHeader extends StatelessComponent { ), const ThemeSwitcher(), const SiteSwitcher(), - - if (activeEntry != ActiveNavEntry.learn) - const Button( - id: 'call-to-action', - style: ButtonStyle.filled, - content: 'Get started', - href: '/learn/pathway', - ), if (context.page.data['sidenav'] != null) const MenuToggle(), ], ), diff --git a/sites/docs/src/_includes/docs/get-started/setup-next-steps.html b/sites/docs/src/_includes/docs/get-started/setup-next-steps.html index 620bd5fa8e..90571c7d9e 100644 --- a/sites/docs/src/_includes/docs/get-started/setup-next-steps.html +++ b/sites/docs/src/_includes/docs/get-started/setup-next-steps.html @@ -5,23 +5,26 @@ alt="A representation of Flutter on multiple devices.">
- Build for other platforms + Set up a target platform
@@ -41,6 +44,9 @@
  • Learn the fundamentals
  • +
  • + Create a new Flutter app +
  • diff --git a/sites/docs/src/_includes/docs/install/quick.md b/sites/docs/src/_includes/docs/install/quick.md index f650ef92b3..23f2cd1383 100644 --- a/sites/docs/src/_includes/docs/install/quick.md +++ b/sites/docs/src/_includes/docs/install/quick.md @@ -1,29 +1,23 @@ -Learn how to use any Code OSS-based editor, such as VS Code, -to set up your Flutter development environment and -test drive Flutter's developer experience. - -If you've developed with Flutter before, -or you prefer to use a different editor or IDE, -you can follow the [custom setup instructions][] instead. - -:::note What you'll achieve - -- Install the software prerequisites for Flutter. -- Use VS Code to download and install Flutter. -- Create a new Flutter app from a sample template. -- Try out Flutter development features like stateful hot reload. - -::: - -[custom setup instructions]: /install/custom +Learn how to use [Visual Studio Code (VS Code)][VS Code] or any compatible +Code OSS-based editor (such as [Antigravity][], [Cursor][], or [Windsurf][]) +to quickly install and set up your Flutter development environment. + +If you prefer a different editor or IDE, +you can [install Flutter manually][], or +configure target platforms and manage an existing SDK in +[Install and set up Flutter][]. + +[VS Code]: https://code.visualstudio.com +[Antigravity]: https://antigravity.google/ +[Cursor]: https://cursor.com/ +[Windsurf]: https://windsurf.com/ +[install Flutter manually]: /install/manual +[Install and set up Flutter]: /install ## Confirm your development platform {: #dev-platform} -The instructions on this page are configured to cover -installing and trying out Flutter on a **Windows**{:.selected-os-text} device. - -If you'd like to follow the instructions for a different OS, -please select one of the following. +These instructions are configured for **Windows**{:.selected-os-text}. +If you're using a different operating system, select it below: @@ -64,24 +58,21 @@ first install the following tools. 1.

    Download and install Visual Studio Code

    To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - - You can instead install and use any other Code OSS-based editor - that supports VS Code extensions. - If you choose to do so, for the rest of this article, - assume VS Code refers to the editor of your choice. + [install and set up Visual Studio Code][vscode-install] + (or your preferred Code OSS-based editor). {: .steps .chromeos-only} - 1.

    Install git

    + 1.

    Install the Xcode command-line tools

    - **If you already have git installed, skip to the next + **If you already have Git installed, skip to the next step: Download and install Visual Studio Code.** - There are a few ways to install git on your Mac, - but the way we recommend is by using XCode. - This will be important when you target your - builds for iOS or macOS. + Download the Xcode command-line tools to get access to + the command-line tools that Flutter relies on, including Git. + This is also required when you target your builds for iOS or macOS. + + To download the tools, run the following command in your preferred terminal: ```console $ xcode-select --install @@ -94,12 +85,8 @@ first install the following tools. 1.

    Download and install Visual Studio Code

    To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - - You can instead install and use any other Code OSS-based editor - that supports VS Code extensions. - If you choose to do so, for the rest of this article, - assume VS Code refers to the editor of your choice. + [install and set up Visual Studio Code][vscode-install] + (or your preferred Code OSS-based editor). {: .steps .macos-only} @@ -113,12 +100,8 @@ first install the following tools. 1.

    Download and install Visual Studio Code

    To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - - You can instead install and use any other Code OSS-based editor - that supports VS Code extensions. - If you choose to do so, for the rest of this article, - assume VS Code refers to the editor of your choice. + [install and set up Visual Studio Code][vscode-install] + (or your preferred Code OSS-based editor). {: .steps .windows-only} @@ -145,12 +128,8 @@ first install the following tools. 1.

    Download and install Visual Studio Code

    To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - - You can instead install and use any other Code OSS-based editor - that supports VS Code extensions. - If you choose to do so, for the rest of this article, - assume VS Code refers to the editor of your choice. + [install and set up Visual Studio Code][vscode-install] + (or your preferred Code OSS-based editor). {: .steps .linux-only} @@ -160,47 +139,38 @@ first install the following tools. [git-install]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git [vscode-install]: https://code.visualstudio.com/docs/setup/setup-overview -## Install and set up Flutter {: #install} - -Now that you've installed Git and VS Code, -follow these steps to use VS Code to install and set up Flutter. - -:::note Download manually -If you prefer to manually install Flutter, -follow the instructions in [Install Flutter manually][]. -::: +
    - 1.

    Launch VS Code

    +## Install and set up Flutter {: #install} - If not already open, open VS Code by searching for it with Spotlight - or opening it manually from the directory where it's installed. +Now that you've installed the prerequisites, +use VS Code to download and set up the Flutter SDK: - 1.

    Add the Flutter extension to VS Code

    + 1.

    Install the Flutter extension

    - To add the Dart and Flutter extensions to VS Code, - visit the [Flutter extension's marketplace page][flutter-vscode], - then click **Install**. - If prompted by your browser, allow it to open VS Code. + Open VS Code, then install the + [Flutter extension from the VS Code Marketplace][flutter-vscode] + or press Cmd/Ctrl + + Shift + X to open the **Extensions** view, + search for `Flutter`, and click **Install**. + Installing the Flutter extension also installs the Dart extension. 1.

    Install Flutter with VS Code

    - 1. Open the command palette in VS Code. + 1. Open the Command Palette in VS Code. Go to **View** > **Command Palette** or press Cmd/Ctrl + Shift + P. - 1. In the command palette, type `flutter`. - - 1. Select **Flutter: New Project**. + 1. In the Command Palette, type `flutter` and select + **Flutter: New Project**. 1. VS Code prompts you to locate the Flutter SDK on your computer. Select **Download SDK**. 1. When the **Select Folder for Flutter SDK** dialog displays, - choose where you want to install Flutter. - - 1. Click **Clone Flutter**. + choose where you want to install Flutter and click **Clone Flutter**. While downloading Flutter, VS Code displays this pop-up notification: @@ -212,7 +182,7 @@ follow the instructions in [Install Flutter manually][]. If you suspect that the download has hung, click **Cancel** then start the installation again. - 1. Click **Add SDK to PATH**. + 1. Once the download finishes, click **Add SDK to PATH**. When successful, a notification displays: @@ -221,7 +191,6 @@ follow the instructions in [Install Flutter manually][]. ``` 1. VS Code might display a Google Analytics notice. - If you agree, click **OK**. 1. To ensure that Flutter is available in all terminals: @@ -231,19 +200,26 @@ follow the instructions in [Install Flutter manually][]. {:type="a"} - :::note - The VS Code setup process might check for Android Studio, which can result in a warning if it's not installed. - You can safely ignore this if you're targeting other platforms (like web, iOS, or macOS), as the installation will still succeed. - Afterward, run `flutter doctor` to verify your installation. - ::: + 1.

    Validate your setup

    - 1.

    Troubleshoot installation issues

    + To verify your installation, open the Command Palette + (Cmd/Ctrl + + Shift + P) and select + **Flutter: Run Flutter Doctor**, or run `flutter doctor` + in your terminal. + + :::note What to expect in `flutter doctor` + You only need checkmarks (`[✓]`) for **Flutter**, **VS Code**, + and the platforms you plan to target + (for example, **Chrome** lets you build for the web immediately). + You can safely ignore `[!]` or `[✗]` warnings for tools like + Android Studio or Xcode until you're ready to target those platforms. + ::: If you encounter any issues during installation, - check out [Flutter installation troubleshooting][troubleshoot]. + consult [Flutter installation troubleshooting][troubleshoot]. {:.steps} -[Install Flutter manually]: /install/manual [flutter-vscode]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [troubleshoot]: /install/troubleshoot diff --git a/sites/docs/src/content/install/add-to-path.md b/sites/docs/src/content/install/add-to-path.md index b7916491a0..4ea14d1bcd 100644 --- a/sites/docs/src/content/install/add-to-path.md +++ b/sites/docs/src/content/install/add-to-path.md @@ -12,7 +12,7 @@ Adding Flutter to your `PATH` allows you to use the :::tip If you haven't downloaded Flutter yet, -follow [Set up and test drive Flutter][] instead. +follow [Install Flutter with VS Code][] instead. :::
    @@ -50,7 +50,7 @@ follow [Set up and test drive Flutter][] instead.
    -[Set up and test drive Flutter]: /install/quick +[Install Flutter with VS Code]: /install/quick ## Windows diff --git a/sites/docs/src/content/install/custom.md b/sites/docs/src/content/install/custom.md deleted file mode 100644 index 90fc3462fb..0000000000 --- a/sites/docs/src/content/install/custom.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Set up Flutter for your particular needs -shortTitle: Custom setup -description: >- - Install and set up Flutter for your preferred - development environment and target platforms. -showBanner: false -sitemap: false ---- - -To get started developing with Flutter, -follow these steps to install and set up Flutter -for your preferred development environment and target platform. - -If you plan to use VS Code or another Code - OSS derived editor -like Antigravity, consider following the [Flutter quick start][] instead. - -[Flutter quick start]: /install/quick - -## Install and set up Flutter {: #install} - -To get started developing apps with Flutter, -install the Flutter SDK to your development device. -Choose one of the following installation methods: - - - -## Set up an IDE or editor {: #editor} - -For the best development experience with Flutter, -install an IDE or editor with support for Dart and Flutter. -Some popular options include VS Code, Antigravity, -Android Studio, and other Code OSS-based editors. - - - -## Set up a target platform {: #target-platform} - -Once you've successfully installed Flutter, -set up development for at least one target platform -to continue your journey with Flutter. - -We recommend [developing for the web][web-setup] first as -it requires no additional setup besides an appropriate browser. -You can always set up development for additional target platforms later. - - - -[web-setup]: /platform-integration/web/setup - -## Continue your Flutter journey {: #next-steps} - -**Congratulations!** -Now that you've installed Flutter, set up an IDE or editor, -and set up development for a target platform, -you can continue your Flutter learning journey. - -Follow the [Flutter learning pathway][], -set up development for an [additional target platform][], or -explore some of these other learning resources. - -{% render "docs/get-started/setup-next-steps.html", site: site %} - -[Flutter learning pathway]: /learn/pathway -[additional target platform]: /platform-integration#setup diff --git a/sites/docs/src/content/install/index.md b/sites/docs/src/content/install/index.md index 208ef1cd77..756a252c97 100644 --- a/sites/docs/src/content/install/index.md +++ b/sites/docs/src/content/install/index.md @@ -1,114 +1,106 @@ --- -title: Install Flutter -shortTitle: Install +title: Install and set up Flutter +shortTitle: Manage installation description: >- - Learn how to install the Flutter SDK. + Download and install the Flutter SDK, configure your IDE and target + platforms, or update and troubleshoot an existing Flutter installation. --- -Ready to build beautiful, multiplatform apps from a single codebase? -Choose from the following two options to get started setting up -your Flutter development environment. + + +## Choose an installation method {: #install} + +To start building multiplatform apps from a single codebase, +choose how you'd like to install the Flutter SDK: -
    - +
    +
    - Quick start + Install with VS Code Recommended
    -
    + -## Try Flutter {:#try} - -You can quickly try Flutter online without any local setup. - - - - - -## Update Flutter {: #update} - -If you already have Flutter installed and would like to -upgrade your Flutter SDK installation or change to a different release channel, -check out [Upgrading Flutter][]. - -When upgrading, also remember to check out the published list of -[breaking changes and migration guides][]. - -[Upgrading Flutter]: /install/upgrade + + +## Set up target platforms and editors {: #target-platform} + +After you install the Flutter SDK, +set up the tools for your target platforms and configure your preferred editor: + +- **Target platforms:** Set up development tools for [Android][], [iOS][], + [web][] (requires only a supported browser), [Windows][], [macOS][], or + [Linux][]. +- **IDEs and editors:** Configure Flutter support in [VS Code][] or + [Android Studio and IntelliJ][]. + +[Android]: /platform-integration/android/setup +[iOS]: /platform-integration/ios/setup +[web]: /platform-integration/web/setup +[Windows]: /platform-integration/windows/setup +[macOS]: /platform-integration/macos/setup +[Linux]: /platform-integration/linux/setup +[VS Code]: /tools/vs-code#setup +[Android Studio and IntelliJ]: /tools/android-studio#setup + + + + + +## Manage or troubleshoot your SDK {: #uninstall} + +If you already have Flutter installed, +use the following guides to update, configure, +troubleshoot, or remove your SDK installation: + +- **[Upgrade Flutter][]:** Upgrade your Flutter SDK to the latest release, + switch release channels, or review [breaking changes and migration guides][]. +- **[SDK archive][]:** Download and install previous releases of the Flutter + SDK. +- **[Add Flutter to PATH][]:** Configure your system's `PATH` environment + variable to run Flutter on the command line. +- **[Troubleshoot SDK][]:** Resolve common issues with your Flutter development + environment. +- **[Uninstall SDK][]:** Remove the Flutter SDK and related configuration files + from your system. + +[Upgrade Flutter]: /install/upgrade [breaking changes and migration guides]: /release/breaking-changes - -## Download previous releases {: #previous-releases} - -If you're looking to download and install previous releases of Flutter, -check out the [SDK archive][]. - -:::note -We recommend keeping your apps and development environments -up to date with the **latest** `stable` or `beta` releases. -::: - [SDK archive]: /install/archive +[Add Flutter to PATH]: /install/add-to-path +[Troubleshoot SDK]: /install/troubleshoot +[Uninstall SDK]: /install/uninstall -## Troubleshoot and uninstall Flutter {: #uninstall} + -Guides to help you resolve common issues with your Flutter development environment and uninstall Flutter. - - +:::tip Ready to start building? +Once your environment is set up, +follow the [Flutter learning pathway][] to build your first Flutter app. +::: +[Flutter learning pathway]: /learn/pathway diff --git a/sites/docs/src/content/install/manual.md b/sites/docs/src/content/install/manual.md index 2f7c1b1789..58ff5ffce8 100644 --- a/sites/docs/src/content/install/manual.md +++ b/sites/docs/src/content/install/manual.md @@ -6,24 +6,23 @@ description: >- Learn how to install and set up the Flutter SDK manually. --- -Learn how to install and manually set up -your Flutter development environment. +Learn how to manually download and set up the Flutter SDK +and configure your development environment. -:::tip -If you're just looking to quickly install Flutter, -consider [installing Flutter with VS Code][with-vs-code] for -a streamlined setup experience. -::: - -[with-vs-code]: /install/with-vs-code +For a faster, automated setup in VS Code (or any Code OSS-based editor), +follow [Install Flutter with VS Code][with-vs-code] instead. +To download a specific Flutter version or release channel, +visit the [SDK archive][], or manage an existing installation in +[Install and set up Flutter][]. -## Choose your development platform {: #dev-platform} +[with-vs-code]: /install/quick +[SDK archive]: /install/archive +[Install and set up Flutter]: /install -The instructions on this page are configured to cover -installing Flutter on a **Windows**{:.selected-os-text} device. +## Confirm your development platform {: #dev-platform} -If you'd like to follow the instructions for a different OS, -please select one of the following. +These instructions are configured for **Windows**{:.selected-os-text}. +If you're using a different operating system, select it below: @@ -49,6 +48,9 @@ first complete the following setup. 1.

    Install the Xcode command-line tools

    + **If you already have Git installed, skip to the next + step: Set up an editor or IDE.** + Download the Xcode command-line tools to get access to the command-line tools that Flutter relies on, including Git. @@ -168,26 +170,13 @@ then extract the SDK to where you want it stored. 1.

    Extract the SDK

    - Extract the SDK bundle you downloaded into - the directory you want to store the Flutter SDK in. + Extract the downloaded `.zip` archive into your chosen directory + (for example, from `Downloads` into `develop`, + adjusting the filename and paths as needed): - 1. Copy the following command. - 1. Replace `` with the path to the bundle you downloaded. - 1. Replace `` with the path to the - folder you want the extracted SDK to be in. - 1. Run the edited command in PowerShell: - - ```powershell - Expand-Archive -Path -DestinationPath - ``` - - For example, if you downloaded the bundle for Flutter 3.47.5 into - the `$env:USERPROFILE\Downloads` directory and want to - store the extracted SDK in the `$env:USERPROFILE\develop` directory: - ```powershell Expand-Archive ` -Path "$env:USERPROFILE\Downloads\flutter_windows_3.47.5-stable.zip" ` @@ -197,20 +186,6 @@ then extract the SDK to where you want it stored. - 1. Copy the following command. - 1. Replace `` with the path to the bundle you downloaded. - 1. Replace `` with the path to the - folder you want the extracted SDK to be in. - 1. Run the edited command in Command prompt: - - ```bat - tar -xf -C - ``` - - For example, if you downloaded the bundle for Flutter 3.47.5 into - the `%USERPROFILE%\Downloads` directory and want to - store the extracted SDK in the `%USERPROFILE%\develop` directory: - ```bat tar -xf "%USERPROFILE%\Downloads\flutter_windows_3.47.5-stable.zip" -C "%USERPROFILE%\develop" ``` @@ -261,22 +236,9 @@ For details, check out the 1.

    Extract the SDK

    - Extract the SDK bundle you downloaded into - the directory you want to store the Flutter SDK in. - - 1. Copy the following command. - 1. Replace `` with the path to the bundle you downloaded. - 1. Replace `` with the path to the - folder you want the extracted SDK to be in. - 1. Run the edited command in your preferred terminal. - - ```console - $ unzip -d - ``` - - For example, if you downloaded the bundle for Flutter 3.47.5 into - the `~/Downloads` directory and want to - store the extracted SDK in the `~/develop` directory: + Extract the downloaded `.zip` archive into your chosen directory + (for example, from `~/Downloads` into `~/develop/`, + adjusting the filename and paths as needed): ```console $ unzip ~/Downloads/flutter_macos_3.47.5-stable.zip -d ~/develop/ @@ -298,22 +260,9 @@ For details, check out the 1.

    Extract the SDK

    - Extract the SDK bundle you downloaded into - the directory you want to store the Flutter SDK in. - - 1. Copy the following command. - 1. Replace `` with the path to the bundle you downloaded. - 1. Replace `` with the path to the - folder you want the extracted SDK to be in. - 1. Run the edited command in your preferred terminal. - - ```console - $ tar -xf -C - ``` - - For example, if you downloaded the bundle for Flutter 3.47.5 into - the `~/Downloads` directory and want to - store the extracted SDK in the `~/develop` directory: + Extract the downloaded `.tar.xz` archive into your chosen directory + (for example, from `~/Downloads` into `~/develop/`, + adjusting the filename and paths as needed): ```console $ tar -xf ~/Downloads/flutter_linux_3.47.5-stable.tar.xz -C ~/develop/ @@ -352,96 +301,31 @@ Adding Flutter to your `PATH` allows you to use the
    +## Validate your setup {: #validate-setup} + +To verify your Flutter installation, run `flutter doctor` in your terminal: + +```console +$ flutter doctor +``` + +:::note What to expect in `flutter doctor` +You only need checkmarks (`[✓]`) for **Flutter**, your preferred editor, +and the platforms you plan to target +(for example, **Chrome** lets you build for the web immediately). +You can safely ignore `[!]` or `[✗]` warnings for tools like +Android Studio or Xcode until you're ready to target those platforms. +::: + +If you encounter any issues during installation, +consult [Flutter installation troubleshooting][troubleshoot]. + +[troubleshoot]: /install/troubleshoot + ## Continue your Flutter journey {: #next-steps} Now that you've successfully installed Flutter, -set up development for at least one target platform +set up development for a target platform or start learning to continue your journey with Flutter. -:::recommend -If you don't yet have a preferred platform -to target during development, -the Flutter team recommends you first try out -[developing on the web][web-setup]! -::: - -[web-setup]: /platform-integration/web/setup - - +{% render "docs/get-started/setup-next-steps.html", site: site %} diff --git a/sites/docs/src/content/install/quick.md b/sites/docs/src/content/install/quick.md index 5e20a65173..05b2bc39fa 100644 --- a/sites/docs/src/content/install/quick.md +++ b/sites/docs/src/content/install/quick.md @@ -1,182 +1,21 @@ --- -title: Set up and test drive Flutter -shortTitle: Quick start +title: Install Flutter with VS Code +shortTitle: Install with VS Code +breadcrumb: With VS Code description: >- - Set up Flutter on your device with a Code OSS-based editor, such as VS Code, and - get started developing your first multi-platform app with Flutter! + Learn how to use VS Code or another Code OSS-based editor to quickly + install and set up the Flutter SDK. showBanner: false -sitemap: false --- {% render "docs/install/quick.md" site: site %} -## Test drive Flutter {: #test-drive} - -Now that you've set up VS Code and Flutter, -it's time to create an app and try out Flutter development! - - 1.

    Create a new Flutter app

    - - 1. Open the command palette in VS Code. - - Go to **View** > **Command Palette** - or press Cmd/Ctrl + - Shift + P. - - 1. In the command palette, start typing `flutter:`. - - VS Code should surface commands from the Flutter plugin. - - 1. Select the **Flutter: New Project** command. - - Your OS or VS Code might ask for access to your documents, - agree to continue to the next step. - - 1. Choose the **Application** template. - - VS Code should prompt you with **Which Flutter template?**. - Choose **Application** to bootstrap a simple counter app. - - 1. Create or select the parent directory for your new app's folder. - - A file dialog should appear. - - 1. Select or create the parent directory where - you want the project to be created. - 1. To confirm your selection, - click **Select a folder to create the project in**. - - 1. Enter a name for your app. - - VS Code should prompt you to enter a name for your new app. - Enter `trying_flutter` or a similar `lowercase_with_underscores` name. - To confirm your selection, press Enter. - - 1. Wait for project initialization to complete. - - Task progress is often surfaced as a notification in the bottom right - and can also be accessed from the **Output** panel. - - 1. Open the `lib` directory, then the `main.dart` file. - - If you're curious about what each portion of the code does, - check out the preceding comments throughout the file. - - 1.

    Run your app on the web

    - - While Flutter apps can run on many platforms, - try running your new app on the web. - - 1. Open the command palette in VS Code. - - Go to **View** > **Command Palette** - or press Cmd/Ctrl + - Shift + P. - - 1. In the command palette, start typing `flutter:`. - - VS Code should surface commands from the Flutter plugin. - - 1. Select the **Flutter: Select Device** command. - - 1. From the **Select Device** prompt, select **Chrome**. - - 1. Run or start debugging your app. - - Go to **Run** > - **Start Debugging** or press F5. - - `flutter run` is used to build and start your app, - then a new instance of Chrome should open and - start running your newly created app. - - 1.

    Try hot reload

    - - Flutter offers a fast development cycle with **stateful hot reload**, - the ability to reload the code of a live running app without - restarting or losing app state. - - You can change your app's source code, - run the hot reload command in VS Code, - then see the change in your running app. - - 1. In the running app, try adding to the counter a few times by - clicking the ![increment (+)][increment-button]{: .text-icon} button. - - 1. With your app still running, make a change in the `lib/main.dart` file. - - Change the `_counter++` line in the `_incrementCounter` method - to instead decrement the `_counter` field. - - ```dart diff - setState(() { - // ... - - _counter++; - + _counter--; - }); - ``` - - 1. Save your changes - (**File** > **Save All**) or - click the **Hot Reload** ![hot reload icon][]{: .text-icon} button. - - Flutter updates the running app without losing any existing state. - Notice the existing value stayed the same. - - 1. Try clicking the - ![increment (+)][increment-button]{: .text-icon} button again. - Notice the value decreases instead of increases. - - 1.

    Explore the Flutter sidebar

    - - The Flutter plugin adds a dedicated sidebar to VS Code - for managing Flutter debug sessions and devices, - viewing an outline of your code and widgets, - as well as accessing the Dart and Flutter DevTools. - - 1. If your app isn't running, start debugging it again. - - Go to **Run** > - **Start Debugging** or press F5. - - 1. Open the Flutter sidebar in VS Code. - - Either open it with the Flutter ![Flutter logo][]{: .text-icon} button in - the VS Code sidebar or open it from the command palette by - running the **Flutter: Focus on Flutter Sidebar View** command. - - 1. In the Flutter sidebar, under **DevTools**, - click the **Flutter Inspector** button. - - A separate **Widget Inspector** panel should open in VS Code. - - In the widget inspector, you can view your app's widget tree, - view the properties and layout of each widget, and more. - - 1. In the widget inspector, try clicking the top-level `MyHomePage` widget. - - A view of its properties and layout should open, and - the VS Code editor should navigate to and focus the line where - the widget was included. - - 1. Explore and try out other features in - the widget inspector and Flutter sidebar. - -{:.steps} - -[increment-button]: /assets/images/docs/get-started/increment-button.png -[hot reload icon]: /assets/images/docs/get-started/hot-reload.svg -[Flutter logo]: /assets/images/branding/flutter/logo/square.svg + ## Continue your Flutter journey {: #next-steps} -**Congratulations!** -Now that you've installed and tried out Flutter, -follow the [Flutter learning pathway][], -set up development for an [additional target platform][], or -explore some of these resources to continue your Flutter learning journey. +Now that you've successfully installed Flutter, +set up development for a target platform or start learning +to continue your journey with Flutter. {% render "docs/get-started/setup-next-steps.html", site: site %} - -[Flutter learning pathway]: /learn/pathway -[additional target platform]: /platform-integration#setup diff --git a/sites/docs/src/content/install/uninstall.md b/sites/docs/src/content/install/uninstall.md index 8450d54fe7..ded79df300 100644 --- a/sites/docs/src/content/install/uninstall.md +++ b/sites/docs/src/content/install/uninstall.md @@ -9,13 +9,10 @@ showToc: false To remove the Flutter SDK from your development machine, delete the directories that store Flutter and its configuration files. -## Choose your development platform {: #dev-platform } +## Confirm your development platform {: #dev-platform } -The instructions on this page are configured to cover -uninstall Flutter on a **Windows**{:.selected-os-text} device. - -If you'd like to follow the instructions for a different OS, -please select one of the following. +These instructions are configured for **Windows**{:.selected-os-text}. +If you're using a different operating system, select it below: diff --git a/sites/docs/src/content/install/with-vs-code.md b/sites/docs/src/content/install/with-vs-code.md deleted file mode 100644 index 1dba2d52bc..0000000000 --- a/sites/docs/src/content/install/with-vs-code.md +++ /dev/null @@ -1,324 +0,0 @@ ---- -title: Install Flutter using VS Code -shortTitle: Install with VS Code -breadcrumb: With VS Code -description: >- - Learn how to use VS Code to quickly install and set up the Flutter SDK. ---- - -Learn how to install and set up Flutter in a Code OSS-based editor. -This includes (but is not limited to), -[VS Code][], [Antigravity][], [Cursor][], and [Windsurf][]. - -[VS Code]: https://code.visualstudio.com -[Antigravity]: https://antigravity.google/ -[Cursor]: https://cursor.com/ -[Windsurf]: https://windsurf.com/ - -:::tip -If you've never set up or developed an app with Flutter before, -follow [Set up and test drive Flutter][] instead. -::: - -[Set up and test drive Flutter]: /install/quick - -## Choose your development platform {: #dev-platform} - -The instructions on this page are configured to cover -installing Flutter on a **Windows**{:.selected-os-text} device. - -If you'd like to follow the instructions for a different OS, -please select one of the following. - - - -## Download prerequisite software {: #download-prerequisites} - -For the smoothest Flutter setup, -first install the following tools. - - 1.

    Set up Linux support

    - - If you haven't set up Linux support on your Chromebook before, - [Turn on Linux support][chromeos-linux]. - - If you've already turned on Linux support, - ensure it's up to date following the - [Fix problems with Linux][chromeos-linux-update] instructions. - - 1.

    Download and install prerequisite packages

    - - Using `apt-get` or your preferred installation mechanism, - install the latest versions of the following packages: - - - `curl` - - `git` - - `unzip` - - `xz-utils` - - `zip` - - `libglu1-mesa` - - If you want to use `apt-get`, - install these packages using the following commands: - - ```console - $ sudo apt-get update -y && sudo apt-get upgrade -y - $ sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa - ``` - - 1.

    Download and install Visual Studio Code

    - - To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - -{: .steps .chromeos-only} - -
    - -:::warning -**Note for Intel Macs:** -Flutter is deprecating support for Intel-based Macs (x64). -Future Flutter releases will require Apple Silicon. -For details, check out the -[macOS Intel deprecation strategy](https://docs.google.com/document/d/1ty3js_Eg2sNIbDuyYS_aV7h4jYdx1hEpX_mV135gO4s/edit?tab=t.0#heading=h.cx7d8y57ce6p). -::: - -
    - - 1.

    Install the Xcode command-line tools

    - - Download the Xcode command-line tools to get access to - the command-line tools that Flutter relies on, including Git. - - To download the tools, run the following command in your preferred terminal: - - ```console - $ xcode-select --install - ``` - - If you haven't installed the tools already, - a dialog should open that confirms you'd like to install them. - Click **Install**, then once the installation is complete, click **Done**. - - 1.

    Download and install Visual Studio Code

    - - To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - -{: .steps .macos-only} - - 1.

    Install Git for Windows

    - - Download and install the latest version of [Git for Windows][]. - - For help installing or troubleshooting Git, - reference the [Git documentation][git-install]. - - 1.

    Download and install Visual Studio Code

    - - To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - -{: .steps .windows-only} - - 1.

    Download and install prerequisite packages

    - - Using your preferred package manager or mechanism, - install the latest versions of the following packages: - - - `curl` - - `git` - - `unzip` - - `xz-utils` - - `zip` - - `libglu1-mesa` - - On Debian-based distros with `apt-get`, such as Ubuntu, - install these packages using the following commands: - - ```console - $ sudo apt-get update -y && sudo apt-get upgrade -y - $ sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa - ``` - - 1.

    Download and install Visual Studio Code

    - - To quickly install Flutter, then edit and debug your apps, - [install and set up Visual Studio Code][vscode-install]. - -{: .steps .linux-only} - -[chromeos-linux]: https://support.google.com/chromebook/answer/9145439 -[chromeos-linux-update]: https://support.google.com/chromebook/answer/9145439?hl=en#:~:text=Fix%20problems%20with%20Linux -[Git for Windows]: https://git-scm.com/downloads/win -[git-install]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git -[vscode-install]: https://code.visualstudio.com/docs/setup/setup-overview - -## Install and set up Flutter {: #install-flutter} - -Now that you've installed Git and VS Code, -follow these steps to use VS Code to install and set up Flutter. - - 1.

    Launch VS Code

    - - If not already open, open VS Code by searching for it with Spotlight - or opening it manually from the directory where it's installed. - - 1.

    Add the Flutter extension to VS Code

    - - To add the Dart and Flutter extensions to VS Code, - visit the [Flutter extension's marketplace page][flutter-vscode], - and click **Install**. - If prompted by your browser, allow it to open VS Code. - - 1.

    Install Flutter with VS Code

    - - 1. Open the command palette in VS Code. - - Go to **View** > **Command Palette** - or press Cmd/Ctrl + - Shift + P. - - 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. - Select **Download SDK**. - - 1. When the **Select Folder for Flutter SDK** dialog displays, - choose where you want to install Flutter. - - 1. Click **Clone Flutter**. - - While downloading Flutter, VS Code displays this pop-up notification: - - ```console - Downloading the Flutter SDK. This may take a few minutes. - ``` - - This download takes a few minutes. - If you suspect that the download has hung, click **Cancel** then - start the installation again. - - 1. Click **Add SDK to PATH**. - - When successful, a notification displays: - - ```console - The Flutter SDK was added to your PATH - ``` - - 1. VS Code might display a Google Analytics notice. - - If you agree, click **OK**. - - 1. To ensure that Flutter is available in all terminals: - - 1. Close, then reopen all terminal windows. - 1. Restart VS Code. - - {:type="a"} - - 1.

    Validate your setup

    - - To ensure you installed Flutter correctly, - run `flutter doctor -v` in your preferred terminal. - - If the command isn't found or there's an error, - check out [Flutter installation troubleshooting][troubleshoot]. - -{:.steps} - -[Install Flutter manually]: /install/manual -[flutter-vscode]: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter -[troubleshoot]: /install/troubleshoot - -## Continue your Flutter journey {: #next-steps} - -Now that you've successfully installed Flutter, -set up development for at least one target platform -to continue your journey with Flutter. - -:::recommend -If you don't yet have a preferred platform -to target during development, -the Flutter team recommends you first try out -[developing for the web][web-setup]! -::: - -[web-setup]: /platform-integration/web/setup - - diff --git a/sites/docs/src/data/sidenav/default.yml b/sites/docs/src/data/sidenav/default.yml index 8e715f3889..6c6e1cce93 100644 --- a/sites/docs/src/data/sidenav/default.yml +++ b/sites/docs/src/data/sidenav/default.yml @@ -1,9 +1,7 @@ - header: Get started -- title: Quick start +- title: Install Flutter permalink: /install/quick -- title: Custom setup - permalink: /install/custom - title: Learn Flutter permalink: /learn @@ -894,10 +892,10 @@ children: - title: Overview permalink: /install + - title: Install with VS Code + permalink: /install/quick - title: Install manually permalink: /install/manual - - title: Install with VS Code - permalink: /install/with-vs-code - divider - title: SDK archive permalink: /install/archive