SlideShare une entreprise Scribd logo
1  sur  19
Flutter 101 - Introduction
and Architecture
Jenish MS
Software Engineer
PRO India
Agenda
● What is Flutter?
● Why Flutter?
● Flutter Architecture
● Flutter Widget
● Demo
What is Flutter?
● Flutter is an open-source project developed by Google in 2017 and available for
free. 3.7.9 is the latest version of Flutter.
● Flutter is a UI Toolkit that helps developers build high performance, natively
compiled applications for mobile, web and desktop from single codebase.
● Flutter uses the Dart programming language, which is a modern language that is
easy to learn and use.
● Flutter provides a set of customizable widgets that can be used to build beautiful
responsive UIs.
Why Flutter?
● Cross-platform development
● Fast development (Hot reload)
● Customizable widgets
● High performance
● Large community
● Dart DevTools ( Inspector, Timeline, debugger, Logging)
Flutter vs React Native
Flutter React Native
Initial Release 2017 2015
Created By Google Facebook
Open Source Yes Yes
Programming Language Dart Javascript
Popularity (Github) 152k stars 109k stars
Documentation Clean and easy to follow Unclear
Performance Higher at 60fps animation standards Lower as it use JS bridge for initiating
interaction
Native Appearance Better as it has access to device core functionalities Less due to its dependency on third-
party
Popular App made BMW, Google Pay, Alibaba Group, Dream11, eBay,
etc...
Facebook Ads, Instagram, Walmart,
UberEats, Airbnb, etc..
Flutter Architecture
● Platform-specific Embedder
● Flutter Engine
● Flutter Framework
Platform-specific Embedder
● Flutter applications are packaged in the same way as any other native application.
● Embedder provides an entrypoint; coordinates with the underlying operating
system for access to service like rendering surfaces, accessibility, and input; and
manage event loop.
● The embedder is written in a language that is appropriate for the platform
○ Java and C++ for Android
○ Objective-C/Objective-C++ for iOS and macOS
○ C++ for Windows and Linux
● Flutter code can be integrate into existing application as a module.
● Flutter includes a number of embedders for common target platform.
Flutter Engine
● Flutter Engine is the core of flutter.
● Flutter engine is written in C++ and supports the primitives necessary to support
all Flutter applications.
● The engine is responsible for rasterizing composited scenes whenever a new
frame needs to be painted.
● Flutter Engine is available to the developer through dart:ui, which wraps C++
code in dart classes.
● It Provides the low-level implementation of Flutter Core API including graphics
(Skia), text layout, file and network I/O, Plugin architecture, Dart runtime and
compile toolchain
Flutter Framework
01 Foundation classes provide the services like animation, geasuture, and
painting.
02
In the rendering layer, we can build the render tree with renderable objects.
The render layer provides the layout if we make any modification with
renderable objects then it updates the render tree and layout.
03
The Widget layer allows to define of widget classes and combines them to
reuse. Most important is each render object in the render layer has a
corresponding class in the widget layer.
The top most layers are material and cupertino layer. These layers
provides the set of controls to implement Material and Cupertino
design language in widgets.
04
Anatomy of an app
Flutter Widget
Widgets are the building blocks of flutter apps. Every UI element in a Flutter app is a
widget, from buttons and textfields to entire screen. There are two types of widgets
Staless widget and Stateful widget.
Flutter’s widget-based architecture allows for fast and efficient app development.
Widgets can be easily composed and combined to create complex interfaces.
Flutter provides a rich set of built-in widgets that are optimized for both Android and
iOS platforms. These widgets follow Material Design guidelines for Android and
Cupertino guidelines for iOS.
Widgets in Flutter are declarative, meaning they describe the UI that should be
rendered rather than the code that should be executed to create it. This allows for
more efficient rendering and makes it easier to reason about the code.
Flutter's layout system uses a flexible box model to allow widgets to be positioned and
sized in various ways. This makes it easy to create responsive UIs that adapt to
different screen sizes and orientations.
05
04
03
02
01
Stateful Widget
Stateful widgets are a type of widget in Flutter that can change their internal state
during the lifetime of the widget.
Stateful widgets have two parts: a stateful widget class that extends the
StatefulWidget class, and a state class that extends the State class.
The state class is where the widget's mutable state is stored, and where any changes
to that state are made.
When a stateful widget's state changes, Flutter automatically rebuilds the widget and
its children to reflect the updated state.
Stateful widgets are useful for building complex user interfaces that require
interactivity, such as forms, animations, and games.
05
04
03
02
01
Stateless Widget
Stateless widgets are a type of widget in Flutter that don't have any mutable state.
Once a stateless widget is built, its appearance and behavior won't change.
Stateless widgets are useful for building simple UI elements that don't require
interactivity, such as text labels, icons, and images.
Stateless widgets are implemented as simple functions that return a widget tree,
rather than as classes with mutable state.
Stateless widgets are more efficient than stateful widgets because they don't need to
rebuild when their state changes. This can improve performance and reduce the risk
of bugs.
04
03
02
01
Widget Lifecycle Methods
● createState
● initState()
● didChangeDependencies()
● build()
● didUpdateWidget()
● setState()
● deactivate()
● dispose()
Widget Lifecycle Diagram
Widget Tree
DEMO
Q A
Thank you!
Jenish MS
LinkedIn @jenishms
GitHub @JenishMS
Twitter @JenishMS7

Contenu connexe

Similaire à Flutter Introduction and Architecture

What Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's ImportanceWhat Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's ImportanceAndolasoft Inc
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development divyawani2
 
Flutter App Development Building Cross-Platform Apps.pdf
Flutter App Development Building Cross-Platform Apps.pdfFlutter App Development Building Cross-Platform Apps.pdf
Flutter App Development Building Cross-Platform Apps.pdfShiv Technolabs Pvt. Ltd.
 
Exploring-the-World-of-Flutter-Development.pptx
Exploring-the-World-of-Flutter-Development.pptxExploring-the-World-of-Flutter-Development.pptx
Exploring-the-World-of-Flutter-Development.pptxlancesterling21
 
Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .Techugo
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSCIIITLucknow
 
Why is flutter considered the best cross platform framework
Why is flutter considered the best cross platform frameworkWhy is flutter considered the best cross platform framework
Why is flutter considered the best cross platform frameworkPixel Crayons
 
Introduction to Android Application Development with Flutter.pptx
Introduction to Android Application Development with Flutter.pptxIntroduction to Android Application Development with Flutter.pptx
Introduction to Android Application Development with Flutter.pptxNikitaSingh741518
 
Flutter vs ReactNative
Flutter vs ReactNativeFlutter vs ReactNative
Flutter vs ReactNativeSumit Sahoo
 
Why companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose FlutterWhy companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose FlutterGeison Goes
 
Flutter Optimization Techniques to Improve Existing App Results.pdf
Flutter Optimization Techniques to Improve Existing App Results.pdfFlutter Optimization Techniques to Improve Existing App Results.pdf
Flutter Optimization Techniques to Improve Existing App Results.pdfTechugo
 
FlutterArchitecture FlutterArchitecture.ppt
FlutterArchitecture FlutterArchitecture.pptFlutterArchitecture FlutterArchitecture.ppt
FlutterArchitecture FlutterArchitecture.pptKevinNemo
 
Technologies Used in Flutter App Development.pdf
Technologies Used in Flutter App Development.pdfTechnologies Used in Flutter App Development.pdf
Technologies Used in Flutter App Development.pdfNishaadequateinfosof
 
Flutter - the Most advanced Cross-Platform App Development Framework
Flutter - the Most advanced Cross-Platform App Development Framework Flutter - the Most advanced Cross-Platform App Development Framework
Flutter - the Most advanced Cross-Platform App Development Framework iMOBDEV Technologies Pvt. Ltd.
 
Flutter app development ppt.pptx
Flutter app development ppt.pptxFlutter app development ppt.pptx
Flutter app development ppt.pptxNarola Infotech
 
GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptxGoogleDeveloperStude22
 
Why is Flutter now Trendsetter in mobile app development .
Why is Flutter now Trendsetter in mobile app development .Why is Flutter now Trendsetter in mobile app development .
Why is Flutter now Trendsetter in mobile app development .Techugo
 
Flutter Forward Event .pptx
Flutter Forward Event .pptxFlutter Forward Event .pptx
Flutter Forward Event .pptxGDSCIIITDHARWAD
 
Why The Future of Flutter Will Be Your Next Big Obsession.pdf
Why The Future of Flutter Will Be Your Next Big Obsession.pdfWhy The Future of Flutter Will Be Your Next Big Obsession.pdf
Why The Future of Flutter Will Be Your Next Big Obsession.pdfTechugo
 

Similaire à Flutter Introduction and Architecture (20)

What Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's ImportanceWhat Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's Importance
 
Flutter technology Based on Web Development
Flutter technology Based on Web Development Flutter technology Based on Web Development
Flutter technology Based on Web Development
 
Flutter App Development Building Cross-Platform Apps.pdf
Flutter App Development Building Cross-Platform Apps.pdfFlutter App Development Building Cross-Platform Apps.pdf
Flutter App Development Building Cross-Platform Apps.pdf
 
Exploring-the-World-of-Flutter-Development.pptx
Exploring-the-World-of-Flutter-Development.pptxExploring-the-World-of-Flutter-Development.pptx
Exploring-the-World-of-Flutter-Development.pptx
 
Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
 
Why is flutter considered the best cross platform framework
Why is flutter considered the best cross platform frameworkWhy is flutter considered the best cross platform framework
Why is flutter considered the best cross platform framework
 
Introduction to Android Application Development with Flutter.pptx
Introduction to Android Application Development with Flutter.pptxIntroduction to Android Application Development with Flutter.pptx
Introduction to Android Application Development with Flutter.pptx
 
Flutter vs ReactNative
Flutter vs ReactNativeFlutter vs ReactNative
Flutter vs ReactNative
 
Why companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose FlutterWhy companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose Flutter
 
Flutter Optimization Techniques to Improve Existing App Results.pdf
Flutter Optimization Techniques to Improve Existing App Results.pdfFlutter Optimization Techniques to Improve Existing App Results.pdf
Flutter Optimization Techniques to Improve Existing App Results.pdf
 
FlutterArchitecture FlutterArchitecture.ppt
FlutterArchitecture FlutterArchitecture.pptFlutterArchitecture FlutterArchitecture.ppt
FlutterArchitecture FlutterArchitecture.ppt
 
Technologies Used in Flutter App Development.pdf
Technologies Used in Flutter App Development.pdfTechnologies Used in Flutter App Development.pdf
Technologies Used in Flutter App Development.pdf
 
Flutter - the Most advanced Cross-Platform App Development Framework
Flutter - the Most advanced Cross-Platform App Development Framework Flutter - the Most advanced Cross-Platform App Development Framework
Flutter - the Most advanced Cross-Platform App Development Framework
 
Flutter app development ppt.pptx
Flutter app development ppt.pptxFlutter app development ppt.pptx
Flutter app development ppt.pptx
 
Flutter UI Framework
Flutter UI FrameworkFlutter UI Framework
Flutter UI Framework
 
GoogleDSC_ GHRCE_ flutter_firebase.pptx
GoogleDSC_ GHRCE_  flutter_firebase.pptxGoogleDSC_ GHRCE_  flutter_firebase.pptx
GoogleDSC_ GHRCE_ flutter_firebase.pptx
 
Why is Flutter now Trendsetter in mobile app development .
Why is Flutter now Trendsetter in mobile app development .Why is Flutter now Trendsetter in mobile app development .
Why is Flutter now Trendsetter in mobile app development .
 
Flutter Forward Event .pptx
Flutter Forward Event .pptxFlutter Forward Event .pptx
Flutter Forward Event .pptx
 
Why The Future of Flutter Will Be Your Next Big Obsession.pdf
Why The Future of Flutter Will Be Your Next Big Obsession.pdfWhy The Future of Flutter Will Be Your Next Big Obsession.pdf
Why The Future of Flutter Will Be Your Next Big Obsession.pdf
 

Dernier

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Flutter Introduction and Architecture

  • 1. Flutter 101 - Introduction and Architecture Jenish MS Software Engineer PRO India
  • 2. Agenda ● What is Flutter? ● Why Flutter? ● Flutter Architecture ● Flutter Widget ● Demo
  • 3. What is Flutter? ● Flutter is an open-source project developed by Google in 2017 and available for free. 3.7.9 is the latest version of Flutter. ● Flutter is a UI Toolkit that helps developers build high performance, natively compiled applications for mobile, web and desktop from single codebase. ● Flutter uses the Dart programming language, which is a modern language that is easy to learn and use. ● Flutter provides a set of customizable widgets that can be used to build beautiful responsive UIs.
  • 4. Why Flutter? ● Cross-platform development ● Fast development (Hot reload) ● Customizable widgets ● High performance ● Large community ● Dart DevTools ( Inspector, Timeline, debugger, Logging)
  • 5. Flutter vs React Native Flutter React Native Initial Release 2017 2015 Created By Google Facebook Open Source Yes Yes Programming Language Dart Javascript Popularity (Github) 152k stars 109k stars Documentation Clean and easy to follow Unclear Performance Higher at 60fps animation standards Lower as it use JS bridge for initiating interaction Native Appearance Better as it has access to device core functionalities Less due to its dependency on third- party Popular App made BMW, Google Pay, Alibaba Group, Dream11, eBay, etc... Facebook Ads, Instagram, Walmart, UberEats, Airbnb, etc..
  • 6. Flutter Architecture ● Platform-specific Embedder ● Flutter Engine ● Flutter Framework
  • 7. Platform-specific Embedder ● Flutter applications are packaged in the same way as any other native application. ● Embedder provides an entrypoint; coordinates with the underlying operating system for access to service like rendering surfaces, accessibility, and input; and manage event loop. ● The embedder is written in a language that is appropriate for the platform ○ Java and C++ for Android ○ Objective-C/Objective-C++ for iOS and macOS ○ C++ for Windows and Linux ● Flutter code can be integrate into existing application as a module. ● Flutter includes a number of embedders for common target platform.
  • 8. Flutter Engine ● Flutter Engine is the core of flutter. ● Flutter engine is written in C++ and supports the primitives necessary to support all Flutter applications. ● The engine is responsible for rasterizing composited scenes whenever a new frame needs to be painted. ● Flutter Engine is available to the developer through dart:ui, which wraps C++ code in dart classes. ● It Provides the low-level implementation of Flutter Core API including graphics (Skia), text layout, file and network I/O, Plugin architecture, Dart runtime and compile toolchain
  • 9. Flutter Framework 01 Foundation classes provide the services like animation, geasuture, and painting. 02 In the rendering layer, we can build the render tree with renderable objects. The render layer provides the layout if we make any modification with renderable objects then it updates the render tree and layout. 03 The Widget layer allows to define of widget classes and combines them to reuse. Most important is each render object in the render layer has a corresponding class in the widget layer. The top most layers are material and cupertino layer. These layers provides the set of controls to implement Material and Cupertino design language in widgets. 04
  • 11. Flutter Widget Widgets are the building blocks of flutter apps. Every UI element in a Flutter app is a widget, from buttons and textfields to entire screen. There are two types of widgets Staless widget and Stateful widget. Flutter’s widget-based architecture allows for fast and efficient app development. Widgets can be easily composed and combined to create complex interfaces. Flutter provides a rich set of built-in widgets that are optimized for both Android and iOS platforms. These widgets follow Material Design guidelines for Android and Cupertino guidelines for iOS. Widgets in Flutter are declarative, meaning they describe the UI that should be rendered rather than the code that should be executed to create it. This allows for more efficient rendering and makes it easier to reason about the code. Flutter's layout system uses a flexible box model to allow widgets to be positioned and sized in various ways. This makes it easy to create responsive UIs that adapt to different screen sizes and orientations. 05 04 03 02 01
  • 12. Stateful Widget Stateful widgets are a type of widget in Flutter that can change their internal state during the lifetime of the widget. Stateful widgets have two parts: a stateful widget class that extends the StatefulWidget class, and a state class that extends the State class. The state class is where the widget's mutable state is stored, and where any changes to that state are made. When a stateful widget's state changes, Flutter automatically rebuilds the widget and its children to reflect the updated state. Stateful widgets are useful for building complex user interfaces that require interactivity, such as forms, animations, and games. 05 04 03 02 01
  • 13. Stateless Widget Stateless widgets are a type of widget in Flutter that don't have any mutable state. Once a stateless widget is built, its appearance and behavior won't change. Stateless widgets are useful for building simple UI elements that don't require interactivity, such as text labels, icons, and images. Stateless widgets are implemented as simple functions that return a widget tree, rather than as classes with mutable state. Stateless widgets are more efficient than stateful widgets because they don't need to rebuild when their state changes. This can improve performance and reduce the risk of bugs. 04 03 02 01
  • 14. Widget Lifecycle Methods ● createState ● initState() ● didChangeDependencies() ● build() ● didUpdateWidget() ● setState() ● deactivate() ● dispose()
  • 17. DEMO
  • 18. Q A
  • 19. Thank you! Jenish MS LinkedIn @jenishms GitHub @JenishMS Twitter @JenishMS7