Quick Setting Up Your Development Environment for Flutter cover image

Quick Setting Up Your Development Environment for Flutter

AZRAF AL MONZIM
by

Published on

Flutter, a powerful and versatile framework for building cross-platform applications, requires a well-configured development environment to unleash its full potential. In this guide, we'll walk you through the step-by-step process of setting up your development environment for Flutter on both Windows and Linux machines.

Requirements

Before diving into the installation process, ensure that your system meets the following prerequisites:

  • JDK version 11+
  • Android Toolchain (for Android Studio)
  • Google Chrome (for web development)
  • Visual Studio (optional, for Windows app development)
  • CMake (for Linux app development)
  • Git 2.x+
  • Flutter SDK

Setting Up on Windows

Operating System and Disk Space

  • Windows 10 or later (64-bit), x86-64 based.
  • Minimum 1.64 GB of available disk space (excluding IDE/tools).

Installing Java (OpenJDK)

  1. Download and install OpenJDK for Windows.
  2. Alternatively, you can use the Microsoft Build of OpenJDK.
  3. Add the bin path to the environment.
  4. Optionally, install OpenJDK with the Windows Package Manager (Winget) for Windows 10 and 11.
java

Installing and Configuring Git

  1. Download and install Git with default settings.
  2. Optionally, use Winget for installation.
git --version
 
git config --global user.name "your_name"
 
git config --global user.email "your_email@example.com"

Installing Android Studio

  1. Download and install Android Studio.

Getting the Flutter SDK (Windows Install)

  1. Install Flutter SDK using Git.
git clone https://github.com/flutter/flutter.git -b stable
  1. Update your PATH variable.
flutter doctor -v

Setting Up on Linux

System Requirements

  • Linux (64-bit)
  • Minimum 600 MB of available disk space (excluding IDE/tools).
  • Required tools: bash, curl, file, git 2.X, mkdir, rm, unzip, which, xz-utils, zip.
  • Shared library: libGLU.so.1 (provided by mesa packages).

Installing Java (OpenJDK)

Debian

sudo apt install default-jdk

Arch

sudo pacman -S jdk-openjdk

Installing and Configuring Git

Debian

sudo apt update sudo apt install git-all

Arch

sudo pacman -S git
git config --global user.name "your_name"
git config --global user.email "your_email@example.com"

Installing Android Studio

  1. Install required libraries for 64-bit machines.

Debian

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

Fedora

sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
  1. Download the .tar.gz file and unpack it.
sudo ./studio.sh

Getting the Flutter SDK

  1. Navigate to the desired folder (e.g., /opt/) and clone Flutter.
git clone https://github.com/flutter/flutter.git -b stable
  1. Add Flutter SDK to your .bash profile.
export PATH="$PATH:`pwd`/flutter/bin"
  1. Check Flutter installation.
flutter doctor -v

Now that your development environment is set up, you’re ready to embark on your Flutter development journey. Happy coding!