In this Flutter tutorial, I will teach you how to install the Flutter Framework on Windows Operating System.
Flutter framework is an open-source platform used to develop Android and iOS applications with one codebase.
Flutter is a really promising framework as it is backed by Google and created in the DART programming language and becoming rapidly popular.
So get ready to dive into your first step towards Flutter journey. So Let’s Begin.
In this tutorial, you will learn the following important things.
- Flutter Framework System Requirements On Windows
- Get The Important Flutter Framework Tools
- Download And Install The Flutter Framework SDK
- Set Up Your System Environment Variable For Flutter
- Run Flutter Doctor Command
- Download And Install The Android Studio
- Setup Your Android Device To Run Flutter Apps
- Setup Android Emulator
- Get the Flutter And DART Plugins In Android Studio
- Run Your First Flutter App In Android Studio
Flutter Framework System Requirements On Windows
To install and run Flutter Framework on your Windows OS machine you must meet these minimum system requirements.
- Operating Systems: Windows 7 with Service Pack 1 or higher (64-bit)
- Hard Disk Space: 500 MB (does not include disk space for IDE/tools)
Get The Important Flutter Framework Tools
There are some system environment tools that are required to run Flutter commands on your machine. You should have them installed in your system.
You will need the following tools.
- Windows Power Shell 5.0 or newer. If you are using Windows 10, it is pre-installed in it.
- Download and Install Git for Windows 2.x (Downloads should start automatically)
To check your current Power Shell version follow the below steps
- Open Start Menu
- In search bar type “Power Shell” and select the program.
- Now in the Power Shell type the command as “PSVersionTable“. You have your version.
If you want to check your git on windows you should do the following steps.
- Open Start Menu
- In search bar type “command prompt” and open it.
- Now in the command prompt type the command as “git“. You have your git commands.
Download And Install The Flutter Framework SDK
There are two ways to download the Flutter SDK (Software Development Kit) to install it for Flutter application development.
Click the link below to download the latest Flutter SDK release in a zip file with a single click.
If you want to download any previous version or want to see all the releases of Flutter Framework SDK then click the link below.
After you download the Flutter Framework SDK extract it to the following folder like C:\src\flutter
Keep in mind that do not install Flutter in a root directory C:\Program Files\ because these directories require extra access privileges.
After extracting the file locate your installed folder the look for flutter_console.bat file and open it by double-clicking on it.
Congratulations now you are ready to run Flutter commands in Flutter console.
Set Up Your System Environment Variable For Flutter
Now you will learn how to update your system environment variable to run flutter commands directly from the windows command prompt.
In your start menu click on search and type “env” and select the Edit environment variables for your account.
Now under the User Variables option selects PATH and click on Edit
a dialogue box will open. Click on New and enter the default Flutter SDK path.
You have successfully updated your system environment variables to run Flutter commands on the windows command prompt.
You have to close and reopen any already open command prompt or console window for the changes to take effects
Run Flutter Doctor Command
Now open a command prompt and run the following command to check if there are any pending dependencies left to complete the flutter setup.
Download And Install The Android Studio
First You need to download and install the Android Studio
After you downloaded the Android Studio open the setup and follow the setup wizard. This wizard helps in downloading the latest stable Android SDK, the latest Android SDK tools and other SDK Build-Tools.
Setup Your Android Device To Run Flutter Apps
If you want to test your Flutter apps on your Android phones then you need to configure your mobile devices in order to work with them.
To connect and run your Flutter Framework applications on Android device you will need a device with Android 4.1 (API level 16) or higher.
You have to enable the USB debugging and developer options mode on your Android device. These settings may differ from device to device.
You can find detailed instructions on how to configuring your Android device in this Android documentation.
If you are using Windows OS then you also need to install Google USB Driver. Use a USB cable to connect your device with the computer.
- If your computer asks for access you should accept it.
- Start your console and type
flutter devicesand run this command. It helps Flutter in recognizing your Android device.
- By default, Flutter uses the Android SDK version the same as the ADB tool. But if you want Flutter to use different installation, then you must set the ANDROID_HOME environment into your account environment variables directory.
Setup Android Emulator To Run Flutter Apps
To run your Flutter applications on an Android Emulator using the following steps.
- First, you should enable the VM acceleration on your machine.
- Download and install Hardware_Accelerated_Execution_Manager from the official Intel website.
- Start Android Studio > Tools > Android > AVD Manager and select Create Virtual Device.
Select your Android device from the list. I recommend installing Android devices images that have a Play button in front of them.
Select your desired Android device and click Next.
Now after this under Emulated Performance, you should select Hardware – GLES 2.0 to enable hardware acceleration.
Now give your Android Emulator a suitable name.
After all, this verifies all the information and click on the Finish button.
Your Android emulator device has been created now.
To view and start your emulator click the Android Virtual Device manager or ADV button available on the toolbar.
After this AVD manager starts and you can start your emulator by pressing the green play button. It will display the default canvas according to your Android OS.
Now we have successfully set up our Android Studio and Android Emulator. Now its time to download and install Flutter and DART plugins.
Get the Flutter And DART Plugins In Android Studio
To install the required plugins start your Android Studio.
Go to the File Menu > Settings > Plugins
Now in the search bar type “Flutter” and install it. Install DART in the same way. I have already installed them.
Run Your First Flutter App In Android Studio
Now I will teach you how to create your Flutter application.
Go to File Menu > New > New Flutter Project
Now a window with different Flutter options opens. Select Flutter Application from the project options.
Now verify your Fludder SDK path location and give a nice name to your Flutter application.
Wait for Android Studio to create SDK and starts your application.
Congratulations you are now ready to create and run your Flutter Application.