0% found this document useful (0 votes)
3 views8 pages

Flutter Introduction

This is a flutter introduction.

Uploaded by

mnaveenkumar6699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Flutter Introduction

This is a flutter introduction.

Uploaded by

mnaveenkumar6699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Android App Development

Flutter: Introduction
Flutter is an open-source UI software development toolkit created by Google. It is used to
build natively compiled applications for:
1. Mobile (Android & iOS)
2. Web
3. Desktop (Windows, macOS, Linux)
Flutter was introduced in the year 2017 by Google.
Flutter uses Dart programming to build apps across any platforms
It works on the bases of SDK and NDK tools which are integrated in Android Studio to
develop android apps.
Popular Apps which are Developed by Flutter are Google Ads , Alibaba, Reflectly, Dream11,
MyBMW.

Importance of flutter:
Cross-platform support: Build apps for Android, iOS, Web, and Desktop with one codebase
Attractive UI: Comes with rich, customizable widgets for beautiful design

Cost-effective: Saves time, effort, and development cost with one team for all platforms.
Open Source – Free to use, with strong support from Google and an active developer
community
Built-in Testing Support – Provides tools for unit, widget, and integration testing.
Firebase Integration – Easy to connect with backend services like authentication, database,
etc.

Future Scope of Flutter in Android App Development:


Flutter has a strong and growing future in Android app development due to the following
reasons:
1. Single Codebase Advantage
Flutter allows building Android and iOS apps using one codebase, saving time, effort, and
cost.

2. High Demand in Industry


Many startups and companies prefer Flutter for Android apps because it's faster to develop
and maintain.

3. Native-Like Performance
Flutter apps perform smoothly on Android devices due to its native compilation and custom
rendering engine.

4. Google Support
Since Flutter is developed by Google (which also owns Android), it has deep integration and
long-term support for Android.

5. Job & Freelance Opportunities


Demand for Flutter Android developers is increasing in India and globally, especially for
startups and cross-platform projects.
1. a ) Install Flutter and Dart SDK.
Aim : To install the Flutter software and Dart SDK in Laptops and Desktops.
Description : This Dart program introduces the basic concepts of the language through a
simple example. It starts by declaring variables of different types such as String, int, double,
and bool, and then prints their values. A function is defined and called to greet the user
using their name. The program also includes an if-else condition to check if the user is an
adult based on their age. Finally, a for loop is used to print numbers from 1 to 5,
demonstrating iteration.

Requirements :
1. System Requirements
For Windows:
OS: Windows 10 or later (64-bit)
RAM: Minimum 4 GB (8 GB recommended)
Disk Space: At least 2.5 GB (excluding Android Studio/IDE)
Tools: Git for Windows

For macOS:
OS: macOS (Intel or Apple Silicon)
RAM: Minimum 4 GB (8 GB recommended)
Disk Space: 2.5 GB or more
Xcode (for iOS development)

2. Software Requirements
Flutter SDK (download from flutter.dev)
Dart SDK (comes with Flutter)
Android Studio / VS Code / IntelliJ IDEA (any IDE with Flutter plugin)
Java Development Kit (JDK) – Required for Android development
Android SDK – Comes with Android Studio
Xcode (only for iOS development on macOS)
Procedure :

Flutter-Installation
1. Download Flutter SDK
Go to the official website: https://flutter.dev
Click "Get Started" → Choose Windows
Download the Flutter SDK (ZIP file)

2. Extract the ZIP File


Extract the downloaded ZIP to any location (e.g., C:\flutter)
And paste the Path of the flutter to Env (Path Setting)
Don’t place it inside Program Files

3. Set Environment Variable


Search for Environment Variables in Start Menu
Under "System variables", find Path → Click Edit
Click New and add: C:\flutter\bin
Click OK to save
4. Install Git for Windows
Download and install Git: https://git-scm.com
Flutter needs Git to work properly
5. Run Flutter Doctor
Open Command Prompt (CMD) or PowerShell
Type: flutter doctor
It checks your setup and tells what is missing

6. Install Android Studio (for Android apps)


Download: https://developer.android.com/studio
Install Android Studio and necessary components (Android SDK, AVD, etc.)
In Android Studio: Install Flutter and Dart plugins

7. Create Your First App


In CMD:
flutter create my_app
cd my_app
flutter run
8. Dart SDK
Open Flutter Extracted Folder > bin >Dart ( Windows Batch File )
And Configure the Dart file by typing the command Dart --version

Result : Flutter and the Dart SDK is installed in the Systems.


1. b) Write a simple Dart program to understand the language basics.

Aim: To write a Dart program to implement the basics of the Language


Description : This program is designed to introduce the foundational concepts of the
Dart programming language in a single example. It begins by declaring variables of
different data types such as int, double, String, and bool to illustrate how Dart handles
primitive data types. A simple function named add is created to demonstrate how to
define and use functions in Dart, which takes two integer parameters and returns their
sum.
The program then includes a conditional if-else block to check whether the sum is
greater than a certain value, helping learners understand decision-making in Dart.
Following this, a for loop is used to print numbers from 1 to 5, which demonstrates how
iteration works in Dart.
Program : ( Prefer Visual Studio Code )

int add(int a, int b) {


return a + b;
}
class Person {
String name;
int age;
Person(this.name, this.age);

void introduce() {
print('Hello, my name is $name and I am $age years old.');
}
}

void main() {
int num1 = 10;
int num2 = 20;
double pi = 3.14;
String message = 'Welcome to Dart!';
bool isActive = true;

print(message);
print('Pi is approximately $pi');
print('Is Active? $isActive');

int sum = add(num1, num2);


print('Sum of $num1 and $num2 is $sum');

if (sum > 25) {


print('Sum is greater than 25');
} else {
print('Sum is 25 or less');
}

print('Counting from 1 to 5:');


for (int i = 1; i <= 5; i++) {
print(i);
}

Person person = Person('Alice', 22);


person.introduce();
}

Output :
Welcome to Dart!
Pi is approximately 3.14
Is Active? true
Sum of 10 and 20 is 30
Sum is greater than 25
Counting from 1 to 5:
1
2
3
4
5
Hello, my name is Alice and I am 22 years old.

You might also like