1. A) INSTALL FLUTTER AND DART SDK.
B) WRITE A SIMPLE DART PROGRAM TO UNDERSTAND THE LANGUAGE
BASICS.
EXP No : Date :
AIM
1(a)To Install Flutter and Dart SDK.
SYSTEM CONFIGURATION
OS: Windows 10/11 (64-bit), macOS (Intel/M1+), or Linux (64-bit).
RAM: Minimum 8 GB (16 GB recommended for Android Studio).
Disk Space: At least 2.5 GB (plus space for IDEs/tools).
Processor: Intel/AMD x64 or Apple Silicon (ARM) for macOS.
Tools: Git must be installed and added to system path.
IDE Support: Android Studio, VS Code, or IntelliJ IDEA recommended.
THEORY
Flutter is an open-source UI software development kit (SDK) developed by Google. It
enables developers to build natively compiled applications for mobile, web, desktop, and
embedded devices using a single codebase. Flutter is powered by the Dart programming
language, which is also developed by Google. One of its key strengths is a rich collection of
pre-built widgets that help create visually appealing and responsive user interfaces. It uses
the Skia graphics engine for fast and smooth rendering. Flutter supports both Material
Design (for Android) and Cupertino (for iOS), allowing apps to look native on both
platforms. The hot reload feature enhances developer productivity by reflecting code
changes instantly without restarting the app. Flutter apps are compiled directly to machine
code, ensuring high performance. Its cross-platform capability reduces development time and
effort. Backed by a strong community and used by major companies like Google, Alibaba,
and eBay, Flutter is a powerful tool for modern app development.
PROCEDURE
Download the Flutter SDK
Go to the official Flutter website: https://flutter.dev
Click on Get Started, then choose your operating system (Windows, macOS, or
Linux)
Download the latest stable Flutter SDK zip file
1. Go to the official Flutter site: https://flutter.dev
2. Click on "Get Started"
3. Choose "Windows"
4. Click on “Download Flutter SDK” – this will download a ZIP file (~1.5–2 GB)
📌 Note:
This SDK includes the Dart SDK as well – no need to install it separately.
Always download the stable channel version for reliability.
Extract the Flutter SDK
Extract the downloaded ZIP file to a suitable location, for example:
o C:\flutter on Windows
o /Users/your-name/flutter on macOS
Do not place Flutter inside directories that require administrator permissions (like
Program Files)
1. Go to the folder where the ZIP file was downloaded (usually in Downloads)
2. Right-click the file and choose “Extract All...”
3. Choose to extract it to:
makefile
CopyEdit
C:\flutter
4. After extraction, you'll see a folder named flutter with subfolders like bin,
examples, packages, etc.
⚠️ Important:
Avoid installing in C:\Program Files or any restricted directory because Flutter
needs to write files during updates and builds.
Install it in a simple path like C:\flutter to avoid permission issues.
Add Flutter to System PATH
Open Search → Edit Environment Variables → Environment Variables
Under System variables, select Path → click Edit
Click New and add:
makefile
CopyEdit
C:\flutter\bin
Click OK to save and close all dialogs
This step allows you to run flutter commands from any command prompt window.
How to do it:
1. Press Windows + S, search for:
mathematica
CopyEdit
Environment Variables
→ Click on “Edit the system environment variables”
2. In the dialog box, click “Environment Variables…” at the bottom
3. Under System Variables, scroll to find Path → click Edit
4. Click New, and type:
makefile
CopyEdit
C:\flutter\bin
5. Click OK on all windows to save changes
6. Restart your PC to apply the changes (important!)
Set Environment Variables (Add Flutter to PATH)
Add Flutter’s bin directory to your system PATH:
o Windows:
Search for “Environment Variables” → Edit Path → Add:
C:\flutter\bin
o macOS/Linux:
Open .bashrc, .zshrc, or .bash_profile, and add:
bash
CopyEdit
export PATH="$PATH:/Users/your-name/flutter/bin"
Run source ~/.bashrc or source ~/.zshrc to apply
Run Flutter Doctor
Open a terminal or command prompt
Run the following command to check setup:
nginx
CopyEdit
flutter doctor
This checks your environment and shows any missing dependencies like Dart,
Android Studio, or device support
After adding to path, test your setup:
Steps:
1. Press Windows + R, type cmd, and press Enter
2. In Command Prompt, type:
nginx
CopyEdit
flutter doctor
3. Press Enter
4. Flutter will check your environment and show output like this:
bash
CopyEdit
[✓] Flutter (Channel stable, 3.x.x)
[✓] Dart
[✗] Android toolchain - missing
[✗] Android Studio - not installed
📌 What does it do?
flutter doctor shows:
What’s installed and working
What’s missing (like Android Studio, device emulator, etc.)
Steps to fix missing parts
Install Dart SDK (Already Included)
Dart SDK comes bundled with Flutter — no separate installation is needed
You can verify Dart installation by running:
css
CopyEdit
dart –version
You don’t need to install Dart separately.
To verify Dart installation, run in Command Prompt:
bash
CopyEdit
dart --version
If Dart is installed correctly, it will show the current version (e.g., Dart 3.x.x)
Install an IDE (Optional but Recommended)
Install Android Studio, Visual Studio Code, or IntelliJ IDEA
Install Flutter and Dart plugins in the IDE for better support and debugging features
You need Android Studio to:
Build and run mobile apps
Use Android emulators
Debug and test apps
Install Android Studio:
1. Go to https://developer.android.com/studio
2. Download and install the latest version
3. During setup, select:
o Android SDK
o Android SDK Platform-Tools
o Android Emulator
Install Plugins:
1. Open Android Studio
2. Go to: File → Settings → Plugins
3. Search and install:
o Flutter
o (It will auto-install Dart plugin)
4. Restart Android Studio
Set Up Emulator or Use Physical Device
Option 1: Use Android Emulator
1. Open Android Studio
2. Go to: Tools → Device Manager
3. Click + Create Device
4. Choose a phone model (e.g., Pixel 5)
5. Download a system image (e.g., Android 12)
6. Finish setup and Start the emulator
Option 2: Use Physical Android Device
1. Connect your phone via USB
2. Go to Developer Options on your phone
3. Turn on USB Debugging
Create and Run a Sample Project
Run the following in terminal to create a new Flutter app:
arduino
CopyEdit
flutter create my_app
cd my_app
flutter run
Make sure you have an Android emulator or physical device connected
Now that everything is set up:
Create a New App
bash
CopyEdit
flutter create my_app
cd my_app
flutter run
This will build and run the app on your connected device or emulator
A default Flutter app will open showing “Flutter Demo Home Page”
RESULT:
Successfully installed Flutter and Dart SDK.
EXP No : Date :
AIM
1(b) Write a simple Dart program to understand the language basics.
SYSTEM CONFIGURATION
OS: Windows 10/11 (64-bit), macOS (Intel/M1+), or Linux (64-bit).
RAM: Minimum 8 GB (16 GB recommended for Android Studio).
Disk Space: At least 2.5 GB (plus space for IDEs/tools).
Processor: Intel/AMD x64 or Apple Silicon (ARM) for macOS.
Tools: Git must be installed and added to system path.
IDE Support: Android Studio, VS Code, or IntelliJ IDEA recommended.
THEORY
Flutter is an open-source UI software development kit (SDK) developed by Google. It
enables developers to build natively compiled applications for mobile, web, desktop, and
embedded devices using a single codebase. Flutter is powered by the Dart programming
language, which is also developed by Google. One of its key strengths is a rich collection of
pre-built widgets that help create visually appealing and responsive user interfaces. It uses
the Skia graphics engine for fast and smooth rendering. Flutter supports both Material
Design (for Android) and Cupertino (for iOS), allowing apps to look native on both
platforms. The hot reload feature enhances developer productivity by reflecting code
changes instantly without restarting the app. Flutter apps are compiled directly to machine
code, ensuring high performance. Its cross-platform capability reduces development time and
effort. Backed by a strong community and used by major companies like Google, Alibaba,
and eBay, Flutter is a powerful tool for modern app development.
PROGRAM
RESULT
Successfully executed simple Dart program to understand the language basics.