SDK and setup
- Flutter course
- Beginner
- Lesson 3/99
- 4 min
Learn to download, install and add Flutter SDK to PATH.
Flutter SDK
The Flutter SDK is the package containing the command-line tools, the Dart compiler and the framework libraries needed to build Flutter apps. You download it from the official site and extract it into a folder. To run flutter from anywhere, you add the SDK's bin directory to your operating system's PATH variable.
# Linux/macOS temporary PATH
export PATH="$PATH:`pwd`/flutter/bin"
# Verify the install
flutter --versionInstallation steps
In order: download the SDK, extract the archive, add the bin directory to PATH and restart the terminal. Then verify with flutter --version. If PATH is not set correctly you get flutter: command not found.
# Make PATH permanent (bash)
echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.bashrc
source ~/.bashrc
flutter --versionPractice Print the setup steps
In main, print three lines in order with print: 1 indirme, 2 kurulum, 3 doctor.
Starter code
void main() {
// sırayla üç kurulum adımını print ile yazdır:
// 1 indirme
// 2 kurulum
// 3 doctor
}Sample solution
void main() {
print('1 indirme');
print('2 kurulum');
print('3 doctor');
}Expected output
1 indirme 2 kurulum 3 doctor
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 What is needed to run flutter from any directory on the command line?
- Install Android Studio
- Install Flutter in the root directory
- Run it with administrator privileges
- Add the SDK's bin directory to PATH Correct answer
Explanation: PATH is the list of directories the shell searches for commands; without bin, flutter works only by full path.
2 Verify the flutter command
flutter ____
flutter --version
Explanation: The flutter --version command shows whether the SDK is installed.
3 Installation concepts
| Term | Meaning |
|---|---|
Flutter SDK |
Development tools and framework package |
bin dizini |
Location added to PATH |
PATH |
List of directories searched for commands |
flutter --version |
Command to verify installation |