Version of Android Studio :-
Recent Version – Lady Bug (2024)
Koala (2024) – initial version
Jellyfish (2023)
Android Virtual Device :-
It’s a configuration in android operating simulator
What is Android Studio ?
ans:- It is a tool which is used to develop android applications.
It has many features, i.e.
1. Gradle Build System
2. Android SDK build tools
3. Build Analyzer
4. API modules
5. Flexibility
What is Kotlin ?
ans:- Kotlin is a cross platform, high – level Programming
Language.
Difference between Android & ios.
ans:-
[Link]
PROGRAM : 1
import 'package:flutter/[Link]';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Hello Joy'),
),
body: Center(
child: Text(
'Hello, World!',
style: TextStyle(fontSize: 24),
),
),
),
);
}
}
NOTE : scaffold provides a framework for implementing the basic
material design layout
AppBar widget creates a top bar, typically with a title.
title: Text ('Hello World App')
PROGRAM : 2
import 'package:flutter/[Link]';
//runApp() is resposible for creating WidgetsFlutterBinding
Which
//is the binding between framework and flutter engine
void main() => runApp(MyApp()); //to start app's execution
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Hello World App',
//scaffold widget in flutter is a basic structure that
//provides the visual layout for a material design app
home: Scaffold(
//AppBar widget is based on Material design
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: Text(
'JOY ADHIKARY is bad Guy',
style: TextStyle(fontSize: 35),
),
),
),
);
}
}
PROGRAM : 3
import 'package:flutter/[Link]';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Hello World App',
home: Scaffold(
appBar: AppBar(
title: Text('Hello World App'),
),
body: Center(
child: HelloWorldWidget(),
),
),
);
}
}
class HelloWorldWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: [Link],
children: [
Text(
'JOY ADHIKARY',
style: TextStyle(fontSize: 24),
),
SizedBox(height: 20), // Add some space between the text
and button
ElevatedButton(
onPressed: () {
// Display a SnackBar with "Hello World" message
[Link](context).showSnackBar(
SnackBar(content: Text('Happy Puja')),
);
},
child: Text('Click Me'),
),
],
);
}
}
Scaffold Messenger of (context) is used to access the nearest
Scaffold Messenger widget in the widget tree, enabling the display
of a Snack Bar.
Snack Bar (content: Text ('Happy Puja')) creates a temporary
message popup with the text "Happy Puja."
Functionality: When this button is pressed, it displays a Snack
Bar with the message "Happy Puja" at the bottom of the screen.
This is a helpful way to give feedback to the user in response to
their action (clicking the button).
PROGRAM : 4
void main() => runApp(MyApp()); // Entry point of the app
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Multi-Text Example',
home: Scaffold(
appBar: AppBar(
title: Text('Multi-Text Example'),
),
body: Center(
child: Column(
mainAxisAlignment: [Link],
children: [
Text(
'JOY ADHIKARY is a Good Guy',
style: TextStyle(
fontSize: 30,
fontWeight: [Link],
color: [Link],
),
),
SizedBox(height: 20),
Text(
'He loves Flutter Development',
style: TextStyle(
fontSize: 25,
fontStyle: [Link],
color: [Link],
decoration: [Link],
),
),
SizedBox(height: 10),
Text(
'Learning is his passion!',
style: TextStyle(
fontSize: 20,
color: [Link],
fontWeight: FontWeight.w500,
),
),
],
),
),
),
);
}
}
PROGRAM : 5
import 'package:flutter/[Link]';
void main() => runApp(MyApp()); // Entry point of the app
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Multi-Text Example with Button',
home: Scaffold(
appBar: AppBar(
title: Text('Multi-Text Example'),
),
body: Center(
child: Column( // Column arranges widgets vertically
mainAxisAlignment: [Link], //
Center vertically
children: [
Text(
'JOY ADHIKARY is a Good Guy',
style: TextStyle(
fontSize: 30,
fontWeight: [Link],
color: [Link],
),
),
SizedBox(height: 20), // Adds spacing between texts
Text(
'He loves Flutter Development',
style: TextStyle(
fontSize: 25,
fontStyle: [Link],
color: [Link],
decoration: [Link],
),
),
SizedBox(height: 20), // Adds more spacing
Text(
'Learning is his passion!',
style: TextStyle(
fontSize: 20,
color: [Link],
fontWeight: FontWeight.w500,
),
),
SizedBox(height: 30),
ElevatedButton(
onPressed: () {
[Link](context).showSnackBar(
SnackBar(
content: Text('Button Pressed! Keep Going, Joy!'),
),
);
},
child: Text('Click Me'),
),
],
),
),
),
);
}
}
❖ In Flutter, importing packages is essential for leveraging
libraries and tools to extend the functionality of your
application
Example: import 'package:http/[Link]' as http;
import 'package:provider/[Link]';
❖ Dart Package: It is a general package, which is written in
the dart language, such as a path package. This package
can be used in both the environment, either it is a web or
mobile platform. It also contains some Flutter specific
functionality and thus has a dependency on the Flutter
framework, such as fluro package.
❖ Plugin Package: It is a specialized Dart package that
includes an API written in Dart code and depends on the
Flutter framework. It can be combined with a platform-
specific implementation for an underlying platform such as
Android (using Java or Kotlin), and iOS (using Objective C
or Swift). The example of this package is the battery and
image picker plugin package.