SlideShare a Scribd company logo
FLUTTER DEVELOPMENT
Lecture 17
‍
What is REST API(application program interface)?
 An API is the set of definitions and protocols for building and integrating the
application software. You can put it Simply as a contract between an information
provider and the user.
 For example, the API design for movie ticket booking could specify that users
need to supply the Theater name, movie name, show time, and the number of
seats. And the replay body should have the available seats for the requested
show.
 In general, API acts as a mediator between the end user and backend resources
and services. In fact, it is the most secure and fastest way to make applications
communicate while having full control over app services and data.
 REST (Representational State Transfer) API or the web API conforms to the
constraints of REST architectural style and allows app interactions with the
RESTful web services.
How does REST API work?
 REST API uses simple HTTP calls to communicate with JSON data.
 A user application can make GET, POST, PUT or DELETE HTTP requests to a
database and send results for the query request in the response database.
 The result can be in JSON, HTML, or XML, which is then parsed into the proper
model class to use in the app.
REST API integration in the Flutter app
 In general, you will go through the following steps for integrating an API into the
Flutter application.
1.Get the base URL, the endpoints, and the API key.
2.Add required packages in-app to consume HTTP resources like http, dio, chopper,
etc.
3.Create a constant file that will hold all your URLs and Endpoints.
4.Parse JSON file to get the Object out of the JSON response.
5.Create files to handle API calls with specific methods to fetch and parse data.
6.Make a method call to load data onto your UI.
 Moreover, while integrating APIs you need to consider the web standards and
conventions.
API uses as HTTP (what is HTTP)
 Flutter provides http package to use http resources. The http package
uses await and async features and provides many high-level methods such as
read, get, post, put, head, and delete methods for sending and receiving data
from remote locations. These methods simplify the development of REST-based
mobile applications.
 Allow communication between server and user
How API Work
Restful Services
JSON Structure
JSON Structure
 Key value pairs are used for keys and values in json structure
JSON Object
Postman Structure
Convert Complex JSON to Dart Classes Easily
API Intigration (resource link)
https://www.youtube.com/playlist?list=PLFyjjoCMAPtzgITDreXNNkSWLKbd1wf51
Thank You

More Related Content

Similar to Flutter development Lecture 17 full powerpoint (20)

PPTX
Day03 api
ABDEL RAHMAN KARIM
 
PPTX
LAJUG Napster REST API
stephenbhadran
 
PDF
Introduction to API
rajnishjha29
 
PDF
Rest web service
Hamid Ghorbani
 
PDF
Ebook undisturbed rest-v1 [res_tful apis]
johnkbutcher
 
PDF
API Basics
Ritul Chaudhary
 
PDF
Moving into API documentation writing
Ellis Pratt
 
PPTX
API Testing Basics.pptx
VikasGupta92111
 
PPTX
Understanding REST APIs in 5 Simple Steps
Tessa Mero
 
PDF
Rest api best practices – comprehensive handbook
Katy Slemon
 
PPTX
Understanding REST APIs in 5 Simple Steps
Tessa Mero
 
PDF
API Management and software services.pdf
Prowess Software Services Inc
 
PDF
Whitepaper-API-Design-Best-Practices. Prowess software services
Prowess Software Services Inc
 
PDF
Whitepaper - A Guide to API Design Best Practices
Prowess Software Services Inc
 
PDF
Third party api integration
Metricoid Technology
 
PDF
A_Complete_Guide_to_API_Development.pdf
PamRobert
 
PDF
building-rest-api-with-spring-boot-in28minutes-presentation.pdf
HarshitRaj774201
 
PDF
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET Journal
 
PDF
Applicaton Development using RESTful APIs
Sourav Maji
 
PDF
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Initiative
 
LAJUG Napster REST API
stephenbhadran
 
Introduction to API
rajnishjha29
 
Rest web service
Hamid Ghorbani
 
Ebook undisturbed rest-v1 [res_tful apis]
johnkbutcher
 
API Basics
Ritul Chaudhary
 
Moving into API documentation writing
Ellis Pratt
 
API Testing Basics.pptx
VikasGupta92111
 
Understanding REST APIs in 5 Simple Steps
Tessa Mero
 
Rest api best practices – comprehensive handbook
Katy Slemon
 
Understanding REST APIs in 5 Simple Steps
Tessa Mero
 
API Management and software services.pdf
Prowess Software Services Inc
 
Whitepaper-API-Design-Best-Practices. Prowess software services
Prowess Software Services Inc
 
Whitepaper - A Guide to API Design Best Practices
Prowess Software Services Inc
 
Third party api integration
Metricoid Technology
 
A_Complete_Guide_to_API_Development.pdf
PamRobert
 
building-rest-api-with-spring-boot-in28minutes-presentation.pdf
HarshitRaj774201
 
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
IRJET Journal
 
Applicaton Development using RESTful APIs
Sourav Maji
 
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Initiative
 

Recently uploaded (20)

PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
community health nursing question paper 2.pdf
Prince kumar
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Dimensions of Societal Planning in Commonism
StefanMz
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Ad

Flutter development Lecture 17 full powerpoint

  • 2. ‍ What is REST API(application program interface)?  An API is the set of definitions and protocols for building and integrating the application software. You can put it Simply as a contract between an information provider and the user.  For example, the API design for movie ticket booking could specify that users need to supply the Theater name, movie name, show time, and the number of seats. And the replay body should have the available seats for the requested show.  In general, API acts as a mediator between the end user and backend resources and services. In fact, it is the most secure and fastest way to make applications communicate while having full control over app services and data.  REST (Representational State Transfer) API or the web API conforms to the constraints of REST architectural style and allows app interactions with the RESTful web services.
  • 3. How does REST API work?  REST API uses simple HTTP calls to communicate with JSON data.  A user application can make GET, POST, PUT or DELETE HTTP requests to a database and send results for the query request in the response database.  The result can be in JSON, HTML, or XML, which is then parsed into the proper model class to use in the app.
  • 4. REST API integration in the Flutter app  In general, you will go through the following steps for integrating an API into the Flutter application. 1.Get the base URL, the endpoints, and the API key. 2.Add required packages in-app to consume HTTP resources like http, dio, chopper, etc. 3.Create a constant file that will hold all your URLs and Endpoints. 4.Parse JSON file to get the Object out of the JSON response. 5.Create files to handle API calls with specific methods to fetch and parse data. 6.Make a method call to load data onto your UI.  Moreover, while integrating APIs you need to consider the web standards and conventions.
  • 5. API uses as HTTP (what is HTTP)  Flutter provides http package to use http resources. The http package uses await and async features and provides many high-level methods such as read, get, post, put, head, and delete methods for sending and receiving data from remote locations. These methods simplify the development of REST-based mobile applications.  Allow communication between server and user
  • 9. JSON Structure  Key value pairs are used for keys and values in json structure
  • 12. Convert Complex JSON to Dart Classes Easily
  • 13. API Intigration (resource link) https://www.youtube.com/playlist?list=PLFyjjoCMAPtzgITDreXNNkSWLKbd1wf51

Editor's Notes

  • #1: NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image.