Install Flutter on Windows
Flutter is an SDK (Software Development Kit) which is a framework for creating mobile applications for both Android and iOS, web and desktop in one code, and is fully supported by Google as the main developer.
Flutter itself is open source where everyone can contribute their thoughts in developing this flutter. 2018 saw the birth of Flutter which was launched by Google with Dart as its programming language. When this article was written, the Flutter version was already version 3.13
List of contents :
- System requirements
- Chocolatey installation
- Install flutter on windows
- VsCode Installation
- Create first project in flutter
- Running the project in the windows chrome emulator
1. System requirements
To Install Flutter on windows the following minimum requirements is :
Operating System: Windows 10 or later (64-bit), x86-64 based.
Disk Space: 1.64 GB (excluding disk space for IDE/tools).
Tools: Flutter depends on the availability of these tools:
– Windows PowerShell 5.0 or later (it comes pre-installed with Windows 10)
– Git for Windows 2.x, with the Use Git from Windows Command Prompt option.
If you have Git for Windows installed, make sure you can run git commands from the command prompt or PowerShell
2. Chocolatey installation
What is Chocolatey? Chocolatey is a package manager that can carry out the software installation process, just by commanding it via Powershell or command prompt, instead of having to download the application then double click the installer then next, next and so on, which of course takes time and is complicated.
Open Command Prompt as Administrator
then type the code below
@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”
like the picture below
To test if you have successfully installed chocolatey you can type “choco” in the command prompt, if it appears like the image below it means you have successfully installed chocolatey
3. Install flutter on windows
After successfully installing chocolatey, it’s time to install Flutter on windows, we will install it via Command Prompt, Run the Command Prompt like picture below
then type the code : choco install flutter in the command prompt, If the process instalation is successful, it will appear as shown in the image below
4. VsCode Installation
After we have flutter instaled, next we will install Vscode as our text editor when writing code later, you can download the zip version via this download link
After downloading, extract the zip file, you can extract it to drive D or C then run code.exe as shown in the image below :
If the installation successful, the Vscode application will open as shown in the image below
5. Create first project in flutter
After we have made the preparations to install Flutter on windows, now is the time for us to create our first flutter project.
Open the terminal by clicking the Terminal menu -> New terminal then it will appear as shown in the image below
then we will create our first project on Drive D, by typing D: in the terminal as shown in the image below
Once on drive D, type the command “flutter create first_project” if successful it will appear as shown in the image below
After successfully creating a new project, now we will open the project we just created by selecting the File menu -> open folder, then the select first_project folder file on drive D as shown in the image below
If it success, Our project files will appear on the right, like the images below
and then open the main.dart file on lib, the main.dart file contains the main script, that will lokk like the images below
6. Running the project in the windows chrome emulator
After we have successfully created a project in Flutter, it’s time for us to run or run our project in the emulator, here I use Windows Chrome as the emulator so that it is lighter than installing the emulator in Genymotion or Android Studio.
The first step is to make sure the Windows Chrome emulator device is active, this can be seen in the bottom right corner, if it says “no device” like the picture below, it means you don’t have the device emulator yet.
To activate the device emulator, click on the words “no device” then in the “select a device to use” box at the top a choice of devices will appear from which you can choose one. like the picture below
After you have an emulator device, then run your project on that device by selecting the “Run -> Start Debugging” menu in the top menu
If successful, Chrome will open by itself and display your first application design, as shown in the image below.
That’s the tutorial on the flutter installation process and the tools needed, hopefully it’s useful