The document provides information about Flutter Forward, an annual event hosted by Google's Flutter team that brings together developers, designers, and enthusiasts to learn about Flutter. It includes details about the 2023 Flutter Forward event such as the website and livestream link. Information about Flutter, its architecture, and Dart programming language is also presented.
YouTube Link: https://youtu.be/9XMt2hChbRo
** Edureka Online Training: https://www.edureka.co/ **
In this edureka PPT, Flutter tutorial, you will learn about google's cross-platform mobile application development framework. You will also learn to make a basic app using flutter at the end of this video.
The following topics are discussed in this PPT
Mobile Application Development
What is Flutter?
Why learn Flutter?
Flutter Architecture
Types of Widgets
How Flutter Compiles
Flutter Installation
Writing Our First Flutter Application
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
YouTube Link: https://youtu.be/9XMt2hChbRo
** Edureka Online Training: https://www.edureka.co/ **
In this edureka PPT, Flutter tutorial, you will learn about google's cross-platform mobile application development framework. You will also learn to make a basic app using flutter at the end of this video.
The following topics are discussed in this PPT
Mobile Application Development
What is Flutter?
Why learn Flutter?
Flutter Architecture
Types of Widgets
How Flutter Compiles
Flutter Installation
Writing Our First Flutter Application
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
My Second Flutter Studyjam slides we covered these topics
- Themeing in flutter
- Flutter routes
- Flutter Data Models
- Isolates in Flutter
- asynchronous
Introduction to Flutter - truly crossplatform, amazingly fastBartosz Kosarzycki
Intro: Flutter meaning rapid variation of electronic signal recently became Dart's framework name for mobile development. This presentation is a short introduction into a cross-platform solution covering iOS/Android. During this 45 minute period you'll learn what is flutter, where it came from and what it's for.
Our meet-up will be focused on the basics of Flutter and introducing Flutter to existing mobile/web developers and curious developers on this exciting technology that is shaping the way mobile development will happen in the future.
Talks:
* Speaker: Arif Amirani (CTO MetroGuild Inc, Ex Directi/Veritas)
* Duration: 45 mins
* Agenda:
** Introduction to Flutter
** Comparison to Flutter/React Native/Native
** (Intro) Life Cycle of Widgets
** (Intro) State management
** Build a simple app using Flutter App in 15 mins
Cross platform app development with flutterHwan Jo
Brief explanation of Flutter(Android / iOS cross platform development framework made by Google), presented on May 2018 at developers meetup, by Hyperconnect Inc.
A session delivered by @amahdy7 from Finland over Hangout in GDG Helwan DevFest16 that toke place in the Modern Academy in Maadi
The slides discuss the power of Flutter and how to start develop with it
Introduction to Flutter sharing session organized by MaGIC Cyberjaya.
In this session I focus on introducing important widgets to build simple application. The widgets are group as:
- Boilerplate (scaffold) widget
- Layouting widgets
- Design widgets.
Hopefully this will help those who would like to start and discover mobile app development with Flutter.
Full version of the presentation can be found on following link:
https://www.facebook.com/mymagic.my/videos/1141346269560536/
Flutter festival - Write your first Flutter applicationApoorv Pandey
Write your first hello world app in Flutter. This is a follow along PPT for Flutter Festival Bhopal. Conducted and organized by GDSC UIT RGPV and Flutter Bhopal 2022
Developing Cross platform apps in flutter (Android, iOS, Web)Priyanka Tyagi
Sharing slides from my Flutter talk at SV Code Camp: https://www.siliconvalley-codecamp.com/Session/2019/developing-cross-platform-applications-using-flutter-web-android-and-ios
YouTube Link: https://youtu.be/8m9jzfjXxtM
**Edureka Online Courses: https://www.edureka.co **
This Edureka PPT on "Flutter vs React Native" will give you a web developer's perspective into the two cross-platform mobile development framework Flutter and React Native. After watching this video, you will be able to make an informed decision on which framework would suit your needs to the best. The following topics are discussed in the PPT -
What is Flutter?
What is React Native?
Flutter vs React Native
Build your first flutter application! - http://bit.ly/Flutter_Tutorial
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
My Second Flutter Studyjam slides we covered these topics
- Themeing in flutter
- Flutter routes
- Flutter Data Models
- Isolates in Flutter
- asynchronous
Introduction to Flutter - truly crossplatform, amazingly fastBartosz Kosarzycki
Intro: Flutter meaning rapid variation of electronic signal recently became Dart's framework name for mobile development. This presentation is a short introduction into a cross-platform solution covering iOS/Android. During this 45 minute period you'll learn what is flutter, where it came from and what it's for.
Our meet-up will be focused on the basics of Flutter and introducing Flutter to existing mobile/web developers and curious developers on this exciting technology that is shaping the way mobile development will happen in the future.
Talks:
* Speaker: Arif Amirani (CTO MetroGuild Inc, Ex Directi/Veritas)
* Duration: 45 mins
* Agenda:
** Introduction to Flutter
** Comparison to Flutter/React Native/Native
** (Intro) Life Cycle of Widgets
** (Intro) State management
** Build a simple app using Flutter App in 15 mins
Cross platform app development with flutterHwan Jo
Brief explanation of Flutter(Android / iOS cross platform development framework made by Google), presented on May 2018 at developers meetup, by Hyperconnect Inc.
A session delivered by @amahdy7 from Finland over Hangout in GDG Helwan DevFest16 that toke place in the Modern Academy in Maadi
The slides discuss the power of Flutter and how to start develop with it
Introduction to Flutter sharing session organized by MaGIC Cyberjaya.
In this session I focus on introducing important widgets to build simple application. The widgets are group as:
- Boilerplate (scaffold) widget
- Layouting widgets
- Design widgets.
Hopefully this will help those who would like to start and discover mobile app development with Flutter.
Full version of the presentation can be found on following link:
https://www.facebook.com/mymagic.my/videos/1141346269560536/
Flutter festival - Write your first Flutter applicationApoorv Pandey
Write your first hello world app in Flutter. This is a follow along PPT for Flutter Festival Bhopal. Conducted and organized by GDSC UIT RGPV and Flutter Bhopal 2022
Developing Cross platform apps in flutter (Android, iOS, Web)Priyanka Tyagi
Sharing slides from my Flutter talk at SV Code Camp: https://www.siliconvalley-codecamp.com/Session/2019/developing-cross-platform-applications-using-flutter-web-android-and-ios
YouTube Link: https://youtu.be/8m9jzfjXxtM
**Edureka Online Courses: https://www.edureka.co **
This Edureka PPT on "Flutter vs React Native" will give you a web developer's perspective into the two cross-platform mobile development framework Flutter and React Native. After watching this video, you will be able to make an informed decision on which framework would suit your needs to the best. The following topics are discussed in the PPT -
What is Flutter?
What is React Native?
Flutter vs React Native
Build your first flutter application! - http://bit.ly/Flutter_Tutorial
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Go 1.10 Release Party, featuring what's new in Go 1.10 and a few deep dives into how Go works.
Presented at the PDX Go Meetup on April 24th, 2018.
https://www.meetup.com/PDX-Go/events/248938586/
Get to know all about us as Google Developer Student Clubs VJTI invites you to FY ORIENTATION '23!🥳
What are the Technical Domains under GDSC? How will GDSC benefit you and how can you be a part of GDSC? Worry not, join in the session and find out!😃
Introduction to Google Cloud & GCCP CampaignGDSCVJTI
Topics covered:
🔴 Why Cloud?
🔴 Learn the basics of cloud.
🔴 Applications of cloud.
🔴 Introduction to the Google Cloud platform
🔴 Insights on the upcoming GCCP Campaign
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!🌐
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
2. Introduction
Flutter Forward is an annual event hosted by Google's Flutter team that brings
together developers, designers, and enthusiasts to learn about the latest
advancements and best practices in building mobile and web applications with
Flutter.
Flutter Forward Event
4. Introduction
Flutter
● Flutter is a free and open-source user interface (UI) software
development kit (SDK) that was developed by Google.
● It enables developers to create high-quality, cross-platform applications
for a range of operating systems including Android, iOS, Linux, macOS,
Windows, and the web using a single codebase.
5. ● One codebase for all platforms
● “It’s all Widgets” principle offers countless possibilities
● Rich libraries
● Flutter is fast
● Flutter is beautiful
Introduction
Why Flutter?
6. Flutter architecture
Dart App:
Composes widgets into the desired UI.
Implements business logic.
Owned by app developer.
Framework (source code)
Provides higher-level API to build high-
quality apps (for example, widgets, hit-
testing, gesture detection, accessibility, text
input).
Composites the app’s widget tree into a
scene.
7. Engine (source code)
Responsible for rasterizing composited scenes.
Provides low-level implementation of Flutter’s core APIs (for example, graphics,
text layout, Dart runtime).
Exposes its functionality to the framework using the dart:ui API.
Integrates with a specific platform using the Engine’s Embedder API.
Embedder (source code)
Coordinates with the underlying operating system for access to services like
rendering surfaces, accessibility, and input.
Manages the event loop.
Exposes platform-specific API to integrate the Embedder into apps.
Flutter architecture
8. Runner
Composes the pieces exposed by the platform-specific API of the Embedder into
an app package runnable on the target platform.
Part of app template generated by flutter create, owned by app developer.
Flutter architecture
9. ● Dart is a programming language developed by Google.
● The programming language is designed for client development such as for
the web and mobile apps, and it can also be used to build server and
desktop applications.
● Dart also forms the foundation of Flutter. Dart provides the language and
runtimes that power Flutter apps, but Dart also supports many core
developer tasks like formatting, analyzing, and testing code.
Dart
Programming language
10. It can be compiled to multiple targets like
● ARM64 machine code for iOS and android
● JavaScript for web browsers
● .exe for Windows, MacOS and Linux
Dart
Programming language
11. void main() {
print('Hello, World!');
}
main is the function which first gets executed!
Dart Basics
Hello World
12. var name = ‘Dart';
var year = 1977;
var value = 3.7;
You can declare most variables without explicitly
specifying their type using var.A variable is “a named
space in the memory” that stores values. In other words,
it acts a container for values in a program. Variable
names are called identifiers.
Variables and Data types
var
13. int lineCount = 0;
Data types
Numbers
double
double value = 10.09;
int
Numbers in Dart are used to represent numeric literals.
14. bool check = true;
Data types
String
Boolean
String workshop = “flutter”; OR ‘flutter’;
15. var lst = new List(3);
lst[0] = 12;
lst[1] = 13;
lst[2] = 11;
var num_list = [1,2,3];
var lst = new List();
lst.add(12);
lst.add(13);
Data types:
list
Dart represents arrays in the form of List
objects. A List is simply an ordered
group of objects
Fixed Length
Dynamic Length
16. 1)
var details = {'Usrname':’Flutter', ‘Password’: ‘admin@123’};
2)
var details = new Map();
details['Usrname'] = 'admin';
details['Password'] = 'admin@123';
Data types:
Map
The Map object is a simple key/value
pair.
17. if (value>10) {
print(‘Value is greater than 10');
} else if (value<0) {
print(‘value is less than 0');
}
.
Decision Making Statements : If-else
18. void main() {
var grade = "A";
switch(grade) {
case "A": { print("Excellent"); }
break;
case "B": { print("Good"); }
break;
case "C": { print("Fair");}
.
Decision Making Statements : Switch
break;
case "D": { print("Poor"); }
break;
default: { print("Invalid choice");
}
break;
}
}
19. for (int month = 1; month <= 12; month++) {
print(month);
}
while (year < 2016) {
year += 1;
}
.
Looping Statements : while and for
20. for (final i in Objects) {
print(i);
}
var n = 10;
do {
print(n);
n--;
}
while(n>=0);
.
Looping Statements : for in and do while
21. Dart comments usually start with //.
// This is a normal, one-line comment.
/* Comments like these are also
supported. */
Dart Comments:
25. Optional Positional Parameters:
To specify optional positional parameters, use square [] brackets. If an
optional parameter is not passed a value, it is set to NULL.
Syntax: void function_name(param1, [optional_param_1]) { }
eg:
void main() {
test_param(123);
}
test_param(n1,[s1]) {
print(n1);
print(s1);
}
Functions:
Output??
26. Optional Named Parameters:
The parameters’ name must be specified while the value is being
passed. Curly brace {} can be used to specify optional named
parameters.
Syntax: void function_name(param1, {optional_param_1}) { }
Eg: void main() {
test_param(123);
test_param(123,s1:'hello');
}
test_param(n1,{s1}) {
print(n1);
print(s1);
}
Functions:
Output
?
27. Optional Parameters with Default values:
Function parameters can also be assigned values by default. However,
such parameters can also be explicitly passed values..
Syntax: void function_name(param1, {param2 = default_value}) { }
Eg: void main() {
test_param(123);
}
void test_param(n1,{s1:1}) {
print(n1);
print(s1);
}
Functions:
Output
?
28. To raise an exception, use throw:
void test_age(int age) {
if(age<0) {
throw new FormatException();
}
}
Exceptions:
throw:
29. To catch an exception, use a try statement with catch (or both):
try {
// code that might throw an exception
}
catch Exception2 {
// code for handling exception
}
Exceptions:
try catch:
30. Exceptions:
try catch:
void main() {
String message = "Hello";
try {
print("The character at the position 5 is ${message[5]}.");
} catch (e) {
print(e);
}
print('Bye!');
}
31. const String greet1 = “Hello”;
const greet2 = “Heyy”;
print(greet1);
print(greet2);
print(geek2);
If we try to reassign the same variable then it will display error.
const keyword:
32. final String greet1 = “Hello”;
final greet2 = “Heyy”;
print(greet1);
print(greet2);
print(geek2);
If we try to reassign the same variable then it will display error.
final keyword:
33. The only difference between the final and const keyword is that final
is a runtime-constant, which in turn means that its value can be
assigned at runtime instead of the compile-time that we had for the
const keyword.
final - runtime constant -> its value can be assigned at runtime
const - compile time constant -> its value is assigned at compile-time
const vs final:
42. Asynchronous Language:
Asynchronous operations let your program complete work
while waiting for another operation to finish. Here
are some common asynchronous operations:
● Fetching data over a network.
● Writing to a database.
● Reading data from a file.
43. ● Null safety means that a variable cannot have a null
or void value.
● This feature improves user satisfaction by reducing
errors and app crashes.
● Null safety ensures that all runtime null-dereference
problems are shown at compile-time.
Null Safety
44. ● Non-nullable: Variables by default cannot be null.
● Adoptable: It is entirely up to you to make the switch
to null safety.
● Fully Sound: All variables that require values must be
initialized appropriately.
Principles of Null Safety in
Dart
45. Nullable types (?):
If you want a variable of some datatype to accept any
object of that type or the value null, give the variable a
nullable type by adding a question mark (?) after the type
name. For example, a variable of type String? can contain
a string, or it can be null.
Syntax:
datatype? var_name …
Null Safety in Dart
46. Non nullable variable
void main() {
int a;
a = null;
print('a is $a.');
}
Nullable variable
void main() {
int? a;
a = null;
print('a is $a.');
}
Error: The value 'null' can't be assigned to a variable of
type 'int' because 'int' is not nullable.
a = null;
^
Error: Compilation failed.
Output:
a is null.
47. The null assertion operator (!):
If you’re sure that an expression with a nullable type isn’t
null, you can use a null assertion operator (!) to make Dart
treat it as non-nullable. By adding ! just after the
expression, you tell Dart that the value won’t be null, and
that it’s safe to assign it to a non-nullable variable.
Syntax:
var_name!
Null Safety in Dart
48. void main() {
String? a = getValue();
int b = a.length;
print('b is ${b}.');
}
String? getValue() {
return "GDSC"; //We know this cannot be null
}
void main() {
String? a = getValue();
int b = a!.length;
print('b is ${b}.');
}
String? getValue() {
return "GDSC"; //We know this cannot be null
}
Output:
b is 4.
Error: Property 'length' cannot be accessed on 'String?'
because it is potentially null.
int b = a.length;
^^^^^^
Error: Compilation failed.
49. void main() {
int? a;
a = 100;
print('a is $a!.');
}
void main() {
int? a;
a = null;
print('a is $a!.');
}
Output:
a is 100.
Uncaught TypeError: Cannot read properties of null
(reading 'toString')Error: TypeError: Cannot read
properties of null (reading 'toString')
50. Null-aware operators (?. or ??):
To handle potentially you can instead use the conditional
property access operator (?.) or null-coalescing
operators (??) to conditionally access a property or
provide a default value if null respectively.
Syntax:
nullableObject?.action();
nullableString ??= 'alternate';
variable = nullableString ?? 'alternate'
Null Safety in Dart
51. void main() {
String? a = null;
int? b = a.length;
print('b is ${b}.');
}
void main() {
String? a = null;
int? b = a?.length;
print('b is ${b}.');
}
Output:
b is null.
Error: Property 'length' cannot be accessed on
'String?' because it is potentially null.
int? b = a.length;
^^^^^^
Error: Compilation failed.
52. void main() {
String? a = null;
String b = (a != null) ? a : 'GDSC';
print('b is ${b}.');
}
void main() {
String? a = null;
String b = a ?? 'GDSC';
print('b is ${b}.');
}
Output:
b is GDSC.
53. Late keyword:
Sometimes variables—fields in a class, or top-level
variables—should be non-nullable, but they can’t be
assigned a value immediately. For cases like that, use the
late keyword.
Syntax:
late datatype var_name;
Null Safety in Dart
54. Basic object oriented programming
Type of computer programming
in which the objects and
their interactions with one
another are considered
central.
It is based on the concept
that all items in a program
such as variables, data
structures, and functions
should be treated as
objects.
OOPs Concepts
55.
56. A class is a template for creating objects. It defines the
data and behavior that all objects of that type will
share. In object-oriented programming, you create classes
by defining a set of attributes and methods. It is a user
defined Data type.
Class
Object
In object-oriented programming, you instantiate a class by
creating an object. An object can be thought of as a
particular instance of a class. It contains its own copy
of each property defined in the class, and each method is
executed independently on that object.
57. Methods are useful for re-usability or keeping functionality
encapsulated inside one object at a time.
In dart to create a class you need to use the class keyword
followed by the name of the class and then open and close
curly braces.
58. class Car {
// attributes
String? color;
int? width;
int? petrol;
// methods
void drive()
{
print("OK");
}
}
void main() {
// constructor
final maruti = Car();
// accessing class attributes & methods
Using the dot operator “.”
maruti.color = "White";
maruti.width = 80;
maruti.petrol = 90;
maruti.drive();
}
59. Creating objects
We can create an object of a defined class using one of its
constructors.
The Constructor is the first thing that is called when you
construct any Object from the Class
Important Properties of Constructor:
● The Constructor name should same as the Class Name.
● The Constructor doesn't return anything. It doesn't have
any return type.
● The Constructor is called only once in its lifetime,
which is when the Object is created.
60. Types of constructors
1.Default Constructor: A Constructor which has no parameter is
called a default constructor or no-arg constructor. If we
don't define it in the class, the Dart compiler will
automatically generate it.
1.Parameterized Constructor: When you pass some
parameters/arguments to the constructor, it is called a
Parameterized Constructor. This type of constructor is
usually used when you want to initialize the properties of
an object.
1.Named Constructor: Sometimes we need more than one
constructor to perform different functionalities. But you
can't create multiple constructors with the same name. To
overcome this problem, dart allows the user to make multiple
constructors with a different names.
61. It is a set of rules and definitions that allows one to
understand a topic or issue without actually knowing about
it in person or how it was developed.
Pillars of OOPs
Abstraction
An Abstract class in Dart is defined as those classes which
contain one or more than one abstract method (methods
without implementation) in them. To declare an abstract
class we make use of the abstract keyword.
A class declared as abstract can’t be instantiated.
An abstract class can be extended, but if you inherit an
abstract class then you have to make sure that all the
abstract methods in it are provided with implementation.
62. Inheritance
Allows one class, called the base or superclass, to be inherited
by another class, called the derived or child class. The child
class then gains all the members of the superclass, including
data and behavior, unless they are overridden in the class. This
allows for code reuse and a more concise way of developing
software. The super keyword is used to refer to immediate parent
of a class.
63. Polymorphism
It is the ability of an object to take on different forms or
be polymorphic. This is usually achieved through inheritance,
where the child class can redefine the behavior of the members
inherited from the superclass. Polymorphism allows for more
flexible code and a greater degree of abstraction.
If a class has multiple methods
having the same name but different
parameters, It is known as method
overloading.
If subclass (child class) has
the same method as declared in
the parent class, it is known
as method overriding.
Method Overloading
64. Encapsulation
The process of combining data and behavior together into a
single unit is called an object. The data and behavior
should be made hidden from the other objects and the
developer. The object can then be assigned to a variable
that can be passed around as if it is an element of code.
To make any variable or function private, we just
need to append _ (Underscore) at the starting of
the variable name (ex: _variableName).
65. Why Flutter?
Using a single platform-agnostic codebase, Flutter
helps developers build high-performance, scalable
applications with attractive and functional user
interfaces for Android or iOS. Flutter relies on a
library of pre-made widgets that make it simple
for even people with limited programming or
development experience to launch their own mobile
applications quickly.
Flutter Introduction
66. ●Flutter is a newer framework compared to any other
development platform present at the moment.
●Flutter can be used to create apps using the Material
UI, a beautiful open-source UI component library
developed by Google.
●Flutter provides quick and handy features like Hot
Reload and Hot Restart, which you’ll be using quite
much later on in the workshop.
●Extensive community support and ready bug fixes
available.
More Reasons to Use Flutter
67. Let’s take a simple
Flutter code for a
basic demo page.
A basic Hello World!
Output code in
flutter looks like
this:
You’ll be learning
each of these widgets
and attributes
throughout the
session!
70. Widgets
“Everything is a Widget in Flutter!”
Flutter widgets are built using a modern
framework that takes inspiration from
React. The central idea is that you build
your UI out of widgets. Widgets describe
what their view should look like given
their current configuration and state.
71. Basic widgets in Flutter
Material Components
Flutter provides a number of widgets that
help you build apps that follow Material
Design. A Material app starts with the
MaterialApp widget.
72. Scaffold is a class in flutter which provides
many widgets or we can say APIs like
Drawer, Snack-Bar, Bottom-Navigation-Bar,
Floating-Action-Button, App-Bar, etc.
Scaffold will expand or occupy the whole
device screen. It will occupy the available
space. Scaffold will provide a framework to
implement the basic material design layout
of the application.
The two main properties of Scaffold are:
AppBar and body.
Scaffold
73. AppBar is he topmost component of the app which
contains the toolbar and some other common action
buttons. As all the components in a flutter application
are a widget or a combination of widgets. So AppBar
is also a built-in class or widget in flutter which gives
the functionality of the AppBar out of the box
AppBar
74. ● title: This property usually takes in the main widget as a parameter to be
displayed in the AppBar.
● backgroundColor: This property is used to add colors to the background of the
Appbar.
● elevation: This property is used to set the z-coordinate at which to place this app
bar relative to its parent.
● shape: This property is used to give shape to the Appbar and manage its shadow.
Properties of AppBar Widget
75. Container class in flutter is a convenience
widget that combines common painting,
positioning, and sizing of widgets. A Container
class can be used to store one or more widgets
and position them on the screen according to
our convenience. Basically, a container is like a
box to store contents. A basic container
element that stores a widget has a margin,
which separates the present container from
other contents.
Container
The fundamental properties of the Container Class are- child, color, height
and width, padding, alignment and Decoration.
76. Elevated Button
Elevated Button is a flutter component included inside
the material package i.e.
“package:flutter/material.dart“. The main
characteristic these buttons hold is the slight
elevation in their surface towards the screen on
getting tapped by the user. In simple language,
elevated buttons are un-deprecated raised buttons
with no explicitly defined button styling. Elevated
Buttons cannot be styled.
The parameters of Elevated button are:
1. child: this represents the button’s label.
2. onPressed: this represents the action to be
executed when the button is tapped
77. A TextField or TextBox is an input element which holds the alphanumeric
data, such as name, password, address, etc. It is a GUI control element that
enables the user to enter text information using a programmable code. It can
be of a single-line text field or multiple-line text field.
The common attributes of TextField in Flutter are:
● decoration: It is used to show the decoration around TextField.
● border: It is used to create a default rounded rectangle border around
TextField.
● labelText: It is used to show the label text on the selection of TextField.
● hintText: It is used to show the hint text inside TextField.
TextField
78. Row and Column are the two most important and
powerful widgets in Flutter. These widgets let you
align children horizontally and vertically as per
the requirement. As we know that when we
design any UI(User Interface) in a flutter, we need
to arrange its content in the Row and Column
manner so these Row and Column widgets are
required when designing UI.
Columns and Rows
79. ● children: This property takes in List<Widget>, that is a list of widgets to display inside
the Row or the Column widget.
● crossAxisAlignment: The crossAxisAlignment takes in CrossAxisAlignment enum as the
object to how the children’s widgets should be placed in crossAxisAlignment. For Row
it is vertical and for Column it is horizontal.
● mainAxisAlignment: This property takes in MainAxisAlignment enum as the object to
decide how the children widgets should be placed in mainAxisAlignment. For Row it is
horizontal and for Column it is vertical.
● textDirection: This property controls the text direction of the Row or Column widget,
which can either be from left-to-right (by default) or right-to-left.
Properties of Row and Column Widget
80. This, as the name suggests, is used to add images in your application. A flutter app
when built has both assets (resources) and code. Assets are available and deployed
during runtime.
Syntax: Image.asset(‘image name’)
Asset Image
This is used to display images directly from the internet. To display
images from the internet, the Image.network() function is used.
Syntax: Image.network(source_url)
Network Image
81.
82. So that was about the basic Widgets. Flutter
uses a variety of other Widgets and Classes to
build a complete and a beautiful application.
The application we will be making over the next
two days will involve many other widgets. You
can learn more about them and how to use them
here:
https://docs.flutter.dev/development/ui/widgets
84. The UI or display in Flutter comprises stacks of widgets popularly called a
widget tree.
The widget tree is constructed by the build method of the stateful or
stateless widget, and it is rebuilt whenever there is a change in the state
of the application.
Each widget tree has a root widget. This is the widget from which other
widgets are stacked upon.
Flutter Widget Tree
Everything in Flutter is a widget...
87. ● A typical widget tree
depicted using the Widget
Tree Inspector
● Selecting a widget shows
the properties and details of
the widget
Widget Inspector
88. BuildContext
BuildContext is a locator that is used to track
each widget in a tree and locate them and their
position in the tree.
Thus, every widget has its own BuildContext as
the location inside the widget tree is unique.
89. BuildContext
Some of the key methods of BuildContext in Flutter include:
inheritFromWidgetOfExactType: This method allows a widget to access the nearest widget of a
given type in the widget tree. It can be used to pass data down the widget tree hierarchy, such as
theme data or localization data.
findAncestorStateOfType: This method returns the state object of the nearest ancestor widget of
a given type. It can be used to access and modify the state of an ancestor widget from a
descendant widget.
findRenderObject: This method returns the RenderObject associated with the widget. A
RenderObject is a low-level object that represents the layout and rendering of a widget. It can be
used to perform custom layout and painting operations.
90. BuildContext is directly usable in every method of State class when using
StatefulWidget. However, if you are using a StatelessWidget, this is not
the case. You have to pass it down the tree you are building.
That’s because a StatelessWidget is immutable. Every member variable of
the class must be final and thus can not be altered after the object has
been constructed. The BuildContext, however, is known later, when the
build() method is called.
BuildContext
91. The build() method
The build() method is a required method that defines the
configuration of a widget.
Flutter maintains the current
state of the app at every given
time, so anytime we update the
User Interface we say that we
are updating the state.
92. Widgets and Classes
Every widget is implemented as a
Widget class in Flutter
The widget class hierarchy in Flutter is
very flexible, allowing to build complex
user interfaces by combining and
nesting different types of widgets.
93. Selecting the right folder structure for your
Flutter application
When building large Flutter apps, one of the first things
we should decide is how to structure our project.
This ensures that the entire team can follow a clear
convention and add features in a consistent manner.
File Structure
94. This is how a default folder
structure of Flutter app looks like.
96. These two widgets are the building blocks of every
widget that flutter provides.
But before we get into what Stateless and Stateful is,
we need to understand what State is. The simplest
way to put it, State is something that can change within
a widget.
97. For example, let’s say we have a like button.
The button can either be filled in, or not
filled in depending on whether it has been
clicked. That’s a state right there. The state of
that button can either be filled in or not filled
in. If a widget is constant and does not
change no matter what is done, then it does
not have a State.
98. Stateless widgets are widgets that do not store any mutable state
within themselves. This means that every time the widget is rebuilt,
it will appear exactly the same as the previous time it was built.
Stateless widgets are usually simpler to implement and use fewer
resources.
Stateful widgets store mutable state within themselves. This means
that their appearance and behavior may change depending on the
values of the internal state. The state of a stateful widget can be
updated by calling setState() method, which rebuilds the widget and
updates its appearance.
Stateless and Stateful
widgets
99. Stateless widgets are like photographs that always look the
same. Every time you see the photo, it looks exactly as it did
before. Similarly, a stateless widget always looks the same
whenever it's displayed.
Stateful widgets are like a chameleon that can change its
appearance depending on the environment. Similarly, a
stateful widget can change its appearance and behavior
depending on the values of its internal state, which can be
updated by the application.
In much more Simpler
Ways..
100. class ItemCount extends StatelessWidget {
final String name;
final int count;
const ItemCount({super.key, required this.name, required this.count});
@override
Widget build(BuildContext context) {
return Text('$name: $count');
}
}
Stateless Widget
102. Pub is the package manager for the Dart programming
language, containing reusable libraries & packages for
Flutter and general Dart programs.
Many developers around the world can contribute to
Flutter’s growth by writing packages and publishing
them at https://pub.dev. It’s a big public repository
where you can find packages for any platform (web,
mobile, or desktop)
Pub.dev