/Flutter_Installation_lesson1

How to install Flutter and Android Studio in your laptop

How to install Flutter in your laptop and create a Android Virtual Device (AVD) with Android Studio

0. Prerequisites

Hardware requeriments

image

Software requeriment

Flutter supports 64-bit version of Microsoft Windows 10 or later

These versions of Windows should include the required Windows PowerShell 5 or later

Install VSCode and Flutter extension

image

Install Visual Studio Community Edition: https://visualstudio.microsoft.com/vs/community/

image

Install IntelliJ IDEA Community Edition: https://www.jetbrains.com/idea/download/?section=windows

image

Git for Windows 2.27 or later to manage source code

Install Android Studio: https://developer.android.com/studio/install

Upgrade to latest version Android Studio

image

image

1. Start building Flutter native desktop apps on Windows

https://docs.flutter.dev/get-started/install/windows/desktop

To install the Flutter SDK on Windows, follow these steps:

1.1. Download the Flutter SDK**

Go to the Flutter official website: Flutter SDK Download

Download the latest stable version of the Flutter SDK

image

1.2. Extract the Flutter SDK**

Extract the downloaded zip file to a desired location on your computer, for example, C:\src\flutter

image

1.3. Update your PATH environmental variable

Add the flutter\bin directory to your system's PATH environment variable

You can do this by following these steps:

Open the Start Search, type in "env", and select "Edit the system environment variables"

In the System Properties window, click on the Environment Variables button

In the Environment Variables window, under System variables, find the Path variable, select it, and click Edit

Click New and add the path to the flutter\bin directory, for example, C:\src\flutter\bin

Click OK to close all windows

image

1.4. Run flutter doctor

Open a new command prompt or PowerShell window and run the following command to verify your Flutter installation:

flutter doctor

image

or

flutter doctor -v

This command will check your Flutter environment and display the installation status of dependencies and tools needed to develop Flutter apps

Follow any additional instructions provided by flutter doctor to complete the setup

image

image

1.5. How to Upgrade Flutter

To check the version of Flutter installed on your system, you can use the following command in your terminal or command prompt:

flutter --version

This command will display the Flutter version along with other details like the Dart version and the framework version

To upgrade your Flutter installation to the latest version, you can use the following command in your terminal or command prompt:

flutter upgrade

This command will fetch the latest stable release of Flutter and update your installation

1.6. How to uninstall Flutter

How to uninstall the SDK

Remove the flutter directory: C:\src\flutter

Remove Flutter configuration files

If you don't want to preserve your Flutter configuration, remove the following directories from your home directory:

%APPDATA%'.flutter-devtools

Remove Dart configuration files

If you don't want to preserve your Dart configuration, remove the following directories from your home directory

%LOCALAPPDATA%'.dartServer

%APPDATA%'.dart

%APPDATA%'.dart-tool

Remove pub package files

If you want to remove Flutter but not Dart, don't complete this section

If you don't want to preserve your pub packages, remove the .pub-cache directory from your home directory

Remove Flutter from your Windows Path variable

To remove Flutter commands from PowerShell, remove Flutter to the PATH environment variable

1.7. Install Android SDK Command-line Tools and Android SDK Platform-Tools

Run Android Studio and select More Actions/SDK Manager

image

Select the menu option Android SDK Command Line Tools

image

Select the menu option Android SDK Platform-Tools

image

1.8. Install Flutter and Dart plugins in IntelliJ IDEA Community Edition

We first install Flutter plugin

image

Then we install Dart plugin

image

We verify we already installed Flutter and Dart plugins for IntelliJ

image

1.9. How to create a new Android Virtual Device (AVD) in Android Studio

We press the three dots button and then we select the option Virtual Device Manager

image

We press the Create Device button

image

We now have to chose a device definition and press the Next button

image

We select the API 34 tab and then we press the Next button

image

We press the Finish button for creating the mobile device simulator

image

We verify the similator was already created pressing the Launch this AVD in the emulator button

image

We can see the device is running

image

We can navigat with Google Chrome

image