Introduction
Flutter is a popular framework for building cross-platform applications with a single codebase. This guide will walk you through the process of installing Flutter on a Windows machine, from setting up the development environment to running your first Flutter app.
Table of Contents
- System Requirements
- Download Flutter SDK
- Install Flutter SDK
- Update Your PATH
- Install Additional Tools
- Run
flutter doctor
- Create and Run a Flutter App
- Conclusion
System Requirements
Before you begin, ensure your system meets the following requirements:
- Operating System: Windows 7 SP1 or later (64-bit)
- Disk Space: 1.64 GB (does not include disk space for IDE/tools)
- Tools: Git for Windows (includes Git Bash)
Download Flutter SDK
- Visit the Flutter Website
- Go to the Flutter official website.
- Download the SDK
- Click the “Download Flutter SDK” button to get the latest stable release.
Install Flutter SDK
- Extract the ZIP File
- Locate the downloaded ZIP file and extract it to the desired location on your system (e.g.,
C:\src\flutter
).
- Locate the downloaded ZIP file and extract it to the desired location on your system (e.g.,
- Avoid Installation Locations with Spaces
- Ensure the installation path does not contain spaces (e.g., avoid
C:\Program Files
).
- Ensure the installation path does not contain spaces (e.g., avoid
Update Your PATH
- Open Environment Variables
- Search for “Environment Variables” in the Windows search bar and select “Edit the system environment variables”.
- Edit the PATH Variable
- Under “System variables”, find the
Path
variable and click “Edit”. - Click “New” and add the path to the Flutter
bin
directory (e.g.,C:\src\flutter\bin
).
- Under “System variables”, find the
- Apply Changes
- Click “OK” to save the changes.
Install Additional Tools
- Android Studio
- Download and install Android Studio.
- Install Android SDK
- Open Android Studio and follow the setup wizard to install the necessary Android SDK components.
- Install Flutter and Dart Plugins
- In Android Studio, go to
File > Settings > Plugins
. - Search for and install the “Flutter” and “Dart” plugins.
- In Android Studio, go to
Run flutter doctor
- Open Command Prompt
- Open a new Command Prompt window.
- Run
flutter doctor
- Type
flutter doctor
and press Enter. - Review the output and follow any additional setup instructions.
flutter doctor
- Type
Create and Run a Flutter App
- Create a New Project
- Open a Command Prompt window and navigate to your development directory.
- Run the following command to create a new Flutter project:
flutter create my_first_app
- Navigate to the Project Directory
- Change to the project directory:
cd my_first_app
- Run the App
- Ensure an Android emulator is running or a physical device is connected.
- Run the app using the following command:
flutter run
Conclusion
By following these steps, you have successfully installed Flutter on your Windows machine and run your first Flutter app. For more detailed information and troubleshooting, refer to the official Flutter documentation. Happy coding!