Setup & Installation
Last updated
Was this helpful?
Last updated
Was this helpful?
Flutter is rapidly becoming the go-to solution for developers aiming to create cross-platform applications. If you're looking to dive into the world of Flutter, this guide will walk you through the installation process for macOS, Windows, and Linux.
Download the Flutter SDK for macOS
Navigate to the official to secure the latest Flutter macOS zip file.
Once downloaded, extract and position the flutter
folder in your preferred directory, such as ~/development
.
Incorporate Flutter into your System Path
To seamlessly run Flutter commands, integrate the flutter/bin
directory into your system path. Open your terminal and input export PATH="$PATH:
pwd/flutter/bin"
.
Initiate a System Check with Flutter Doctor
Launch your terminal and execute flutter doctor
to ensure Flutter's successful integration.
After successfully installing Flutter, the next step is to set up an IDE and run your Flutter app on an emulator.
Flutter supports a range of IDEs, but for this tutorial, we'll focus on Visual Studio Code and Android Studio, as they are the most popular and beginner-friendly.
1. Visual Studio Code (VS Code)
Installation
Open VS Code and head to the Extensions view by clicking on the square icon on the sidebar or pressing Ctrl+Shift+X
.
Search for "Flutter" and install the Flutter extension provided by Dart Code.
2. Android Studio
Installation
During installation, ensure the "Android Virtual Device" option is checked.
Once installed, open Android Studio and head to Configure > Plugins
.
Search for "Flutter" and install the Flutter plugin. This will also prompt you to install the Dart plugin, which is necessary for Flutter development.
1. Using Android Studio
Creating a Virtual Device
Open Android Studio and navigate to Tools > AVD Manager
.
Click on "Create Virtual Device" and select a hardware profile for your emulator.
Choose a system image (preferably with Google APIs) and download it.
Finish the setup and click on "Play" to start your emulator.
2. Using VS Code
If you've set up an emulator using Android Studio, VS Code can directly use that. Ensure the emulator is running when you try to launch your Flutter app from VS Code.
Create a New Flutter App
In Android Studio: File > New Flutter Project > Flutter Application
.
In VS Code: Open the command palette (Ctrl+Shift+P
), and run Flutter: New Project
.
Run the App
In Android Studio: Click on the green play button.
In VS Code: With the main Dart file open (main.dart
), click on Run > Start Debugging
.
Your Flutter app should now launch on the emulator. You'll see a default app with a clickable "+" button that increments a counter.
Happy coding!
Go to the and download the Flutter Linux tarball file.
Download and install .
Download and install .
With Flutter and your chosen IDE set up, you're now equipped to start building beautiful cross-platform apps. As you progress, remember that the is a treasure trove of information.