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

PPTX
Apitesting.pptx
PDF
Best practices and advantages of REST APIs
PDF
Session 8 Android Web Services - Part 1.pdf
DOCX
Salesforce Integration
PDF
Rest API Interview Questions PDF By ScholarHat
PDF
REST based API
PDF
ReSTful API Final
PDF
What are restful web services?
Apitesting.pptx
Best practices and advantages of REST APIs
Session 8 Android Web Services - Part 1.pdf
Salesforce Integration
Rest API Interview Questions PDF By ScholarHat
REST based API
ReSTful API Final
What are restful web services?

Similar to Flutter development Lecture 17 full powerpoint (20)

PPTX
PPTX
LAJUG Napster REST API
PDF
Introduction to API
PDF
Rest web service
PDF
Ebook undisturbed rest-v1 [res_tful apis]
PDF
API Basics
PDF
Moving into API documentation writing
PPTX
API Testing Basics.pptx
PPTX
Understanding REST APIs in 5 Simple Steps
PDF
Rest api best practices – comprehensive handbook
PPTX
Understanding REST APIs in 5 Simple Steps
PDF
Whitepaper-API-Design-Best-Practices. Prowess software services
PDF
API Management and software services.pdf
PDF
Whitepaper - A Guide to API Design Best Practices
PDF
Third party api integration
PDF
A_Complete_Guide_to_API_Development.pdf
PDF
building-rest-api-with-spring-boot-in28minutes-presentation.pdf
PDF
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
PDF
Applicaton Development using RESTful APIs
PDF
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
LAJUG Napster REST API
Introduction to API
Rest web service
Ebook undisturbed rest-v1 [res_tful apis]
API Basics
Moving into API documentation writing
API Testing Basics.pptx
Understanding REST APIs in 5 Simple Steps
Rest api best practices – comprehensive handbook
Understanding REST APIs in 5 Simple Steps
Whitepaper-API-Design-Best-Practices. Prowess software services
API Management and software services.pdf
Whitepaper - A Guide to API Design Best Practices
Third party api integration
A_Complete_Guide_to_API_Development.pdf
building-rest-api-with-spring-boot-in28minutes-presentation.pdf
IRJET- Hosting NLP based Chatbot on AWS Cloud using Docker
Applicaton Development using RESTful APIs
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Ad

Recently uploaded (20)

PDF
Pre independence Education in Inndia.pdf
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Onica Farming 24rsclub profitable farm business
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PDF
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pre independence Education in Inndia.pdf
How to Manage Starshipit in Odoo 18 - Odoo Slides
Revamp in MTO Odoo 18 Inventory - Odoo Slides
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Introduction and Scope of Bichemistry.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Week 4 Term 3 Study Techniques revisited.pptx
Onica Farming 24rsclub profitable farm business
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
Open Quiz Monsoon Mind Game Prelims.pptx
The Final Stretch: How to Release a Game and Not Die in the Process.
Abdominal Access Techniques with Prof. Dr. R K Mishra
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
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.