REST API with Flutter | Step by step tutorial
Вставка
- Опубліковано 31 лип 2024
- Learn API integration with Flutter. Step by step tutorial
JSON Placeholder : jsonplaceholder.typicode.com
API : jsonplaceholder.typicode.com/...
JSON to Dart : app.quicktype.io
HTTP package : pub.dev/packages/http
command: flutter pub add http
0:00 - Introduction
1:23 - JSON to model
2:50 - Model-View binding
5:03 - Http call
9:18 - UI design
If you like my work
Buy me coffee on : ko-fi.com/afzalali15
Join this channel to get access to perks:
ua-cam.com/users/CodeXDevjoin
Gears ========
Camera 📸 || Canon 250D : amzn.to/34isdKr
Mic 🎤 || Maono AU-04 : amzn.to/341g9wS
#CodeX
Connect with me on social media:
FB: / codexdevs
Twitter: / afzalali_dev
LinkedIn: / afzalali15
Discord: / discord
Git Source: github.com/afzalali15/REST-API-with-Flutter
can you explaine Post, delete and put also???
Sir I am working on flutter connect moodle API is there any way I can get real-time data please help me thank you
I'm 3 years experienced ionic Angular Mobile App developer. I've started flutter development two days ago😀 because I've to deal with a flutter E-Commerce project. So the point is being an experienced developer I can say that watching your video is worth going. Thanks for such good Stuff May Allah bless you.
Thanks for sharing 😍
Brother plz help !
I have 2 months left for the completion of my graduation , i know the basics of flutter , api , few sorting algorithms . How can i be job ready as flutter developer in 2 months .?
Thanks a lot for this tutorial! 🔥 As for a beginer API calls was a real nightmare for me. But with your tutorial everything gets nice and clear for me. I'm sure with practice it will become like a second nature! Appreciate your effort a lot! 🙏🏻
100%
you are one of the good flutter guy. impressive tutorial. I hope people will recognize you more.
Truly great tutorial, exceptional content and style!
Thanks for the video, really helpful, anyone just getting into flutter and learn http request needs to watch this. Alot has actually changed in a couple of months. Especially with null safety.
Thank you so much 😍
Production quality is so much better. Same info covered in shorter time. Great work.
Much appreciated!
Finally I found what I've been looking for. Thanks! :)
Obrigado mestre!continue com o ótimo conteúdo!saudações do Brasil
Wow, i feel so stupid right now, i've been struggling with APIs for over a week now and i am just 2 mins in and i am 10x smarter, thanks
Can we get 1K likes in a week 🥰😉
Yes
Sir Please make a video on socket api please please please
Thank you for this tutorial. You just earned a new sub
thank you.. clear and straight forward to jump forward to implement api in flutter ❤
Thank you so much @Bijak :)
incredibly well explained. Thank you!
Glad you liked it!
Great work ever sir.... Uh didn't waste a single second👍
Thank you so much 😀
Really and extremely helpful nice job 👌🏾👍🏾
Amazing! THANK YOU!!!!!
U r just awesome , waiting for more such quality content🥰🥰🥰🥰🥰
Subscribing is the only option 😆 see you in the next video 👍🏼
Love it 💕 thanks for the great knowledge
So glad!
thanks for the helpful video. whenever i navigate into a page that requests data, i get a "null check operator used on a null value" error screen for like 0.1 seconds. then page loads with no problem. any idea why?
You explain very well and logically. Thank you for your good videos bro. In the hope of Allah, you will be more successful than you are.
Many many thanks
Thankyou so much, I don't have words.
You already wrote 7 words😜, thank you for the feedback 😍
Great content! Thank you
Awesome! Thanks!
Thanks again for the tutorial! i got an issue my vscode complains when i try to return postFromJson(json); it looks like the method is not working
i subscribed because i loved the way you present it
Amazing, working hard to produce more awesome content. 😍
You are the best ❤
Perfect. Bravo.
Excellent Tutorial Thanks for that 👏👏👏
Glad it was helpful!
If i don't have a json file and want to get data displayed in specific file , how to do this?
yeap its run totally thanks dude
Thank you very much!
Thanks, this content is meaty!
Glad you enjoy it!
Thanks for the video.
in 12 minute i learn 3 things
Flutter, Flutter applying API, and API it self
kudos
Thanks, this vídeo helps me a lot
Glad it helped
Ok. I did it step by step, and it works. I am looking for video with how to buttons get, post, delete, update.
life saver!
Thanks. At 6:15 you mention that it is recommended to create an http client instance. By that, do you mean a global variable in the class? If so, would this class be static or a singleton to avoid re-instantiating the client instance? This is what I want to build for my project, that will also handle authentication, so with each call, do a check of the current token expiry datetime subtract the current datetime to see if my token is still valid, and if not, re-authenticate, update the auth headers and continue with the request.
What I can't find is whether I should do this static class, or extend http client (or both). What are Flutter industry standards?
Amazing!!!!
thank you amazing tuto
hindos i love you 🔥🔥🔥🔥🔥🔥 ireally apreciate it bro
thanks you so much , great !!!!!
thanks you man
After long time n yaa thank you for the tshirt 🤝🏽🤝🏽
Yeah, I was on vacation and didn't managed to upload, but now I am back!
you are the best
Thank you Brother🤩
thanks for the video. how to do when api key is needed?
Super Bro lot of thanks
Amazing tutorial❤
Thank you! Cheers!
Great tutorial
Awesome. Can you make a video showing how to create our own rest api and connect to SQL server that will a great help. Thanks in advance
Sir I have done it and am using it to get news in the app from a free api but the problem I am facing is that there are a limited number of requests I can make which turns into an error, can you tell how we can create our own apis with default data in it to show I. Our UI.
Hello, this is a very well-explained video! My request: could you please combine it with the GET and POST method for this API topic using HTTP?
Thanks for feedback 😍 Will do a video covering GET, POST, PUT n DELETE 👍🏼
Can I use the same code to access users?
How to do it if I have application password of my WordPress website?
Great stuff
easy ! this is greay sir
This is wowwwwwwwwww broo... Keep it up
Thank you so much 😀
cThis very nice video than other api video of your channel . Can u give the video of all crud operation for same api. that will be very helpful.
are you have a videos auth login using rest api in flutter, bro?
sir if i need to fetch login data from my website server and get data to my flutter app..how can i do it sir pls hel me sir
life saver
sir , make video like this but using DIO. what is difference DIO and HTTP ? which one is better ?
Hey! Can you make a tutorial on how to make geofence in Flutter ?
Great video indeed. How are you bringing up those context menus to create the widgets? Is there an extension you have to install?
Thats in built, command+. on mac system
Cool ❤🔥
Can you help me
I am stuck on google map
How can I visible all markers info window???
Please
Awesome...thank you...
Welcome 😊 appreciate your comment!
why you are using not equal to sign in container section??
can you show us to load local json data?
Sir mera postFromJson ka method ni arha? Red underline ata ha
So this is GET operation, what about POST?
Hi bro,
can you please do a tutorial on flutter php mysql REST API...that would be so much helpful to me.
Hello there,thanks for the great work I really learned a lot but I wanna ask a question. How can I turn this a news app? How should replace the news api into this? Yeah I know there is a lot of examples of that but they're too old
Change URL, replace model with News model and you'r done!
Hey, thanks for your tutorials, I'm a big fan. I wanted to ask which software you use to record and edit your videos.
I record using OBS and edit inside Premier Pro
@@CodeXdev thanks
Hello sir, I've followed your tutorial and it works perfectly for basic API calls. Unfortunately, I have found difficulties trying to call and display data from APis where data is nested ("id:", "name:", "number:" etc). Do you have any ideas or tutorials that can help me ? I have not found anything helpful on the internet, perhaps I am just bad because I am a beginner but any help would be welcome. Thank you.
Use JSON parser
Good job
It would be nice if there was a video explaining the implementation of search bar
please make it
Waiting for it! Searchbar using GetX
I owe you my life *bows*
Is service an another name for repository?
i was finding the exact tutorial...thankyou so much.
can you also do firebase tutorial and sql database plsss
Great to hear that it helped, Surely planning Firebase tutorials soon!
Hi, I am pretty new to flutter, I would appreciate if anyone could help with this error:
E/flutter ( 2874): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'Map'
Apparently this error is pointing to my model in Post class.
It means that you are trying to convert 'Null' response to json (Map).. put a check before converting response to json.
If you want to discuss further, please connect on Discord link in description, community will help you there.
@@CodeXdev Thanks alot 🙏🏼
I want to learn how to handle apiKey and accessToken on real projects.
Please do same using RapidApi endpoint to fetch list of soccer teams and few meta data.
RapidApi itself requires some knowledge to setup and get the access token, Currently this tutorial only teaches the basic of API. Hopefully in future I will do tutorial with custom APIs
@@CodeXdev i agree with you that it's not an easy challenge.
However, i'll be very pleased if you attend to my request.
Cool
Sir plz make a video on isolates. And how to use isolates with api
love you
Kindly Make a detailed tutorial of BLOC...
Can you make a torturial how to get data to textfield when we use mouse to click on data just like mouse click event in C# .NET
Can anyone help me in this I am getting error in this line of code.
posts = await RemoteService().getPosts();
What is that error? You can share on discord group
thanks
Thankxs for converter
Great tutorial
i installed your code on android phone and the data never loads. the screen stays on loading page. any reason why. it works on my computer but when i build the apk and install on android phone it hangs
Internet connection, either you don’t have permission in manifest or you don’t have data 😬
what you meant by restful api integration ,because the api integration must follow some rule to implement rest ful api integration? otherwise it's just only api integration
Can you make a video on Mvvm with api calling using getX and with pagination as well?
I have a video for API calling using GetX... you need to learn pagination separately and apply in this 😉👍🏼
Last few yrs i following your chennal . I saw all video and also live stream.can you give dedicated video for bloc .
Thank you so much for being connected with CodeX. I will try to cover Bloc in of my video.. but you can get fair idea looking at StreamController video on my channel.
I tried to follow your tutorial but when I pasted the pists from jason place holder to to app.quicktype, following exactly tye way you did it, it gave a different lines of code/model and theres not even a word "class" in it..when I pasted it in my vscode where Im coding flutter, it gave so many errors..what do you think went wrong?..is it really possible that even if I follow you exactly, I will get a different code?..please advise..thanks
Hello, you should get same class if you have pasted correct json. May be json has changed on jsonplaceholder site but still, it should give you valid class
@@CodeXdev that the problem coz it really did not return a class and the size of codes is just about 1/3 of what you got..it's really very few..maybe it changed..anyway, thanks for replying..I appreciate it so much..Im still continuing my self learning via UA-cam. Im trying my best because I really want to learn it 👍
Great to hear that your are putting efforts to learn it, you can join on discord link in description and get some guidance over there
@@CodeXdev thanks..joined discord ..my first time to use discord 👍😊
Hello, Please Give Me a Link of Your Github Account to Some Project for How can we SetUp For Project Routes,Utils,Modules,CommonConstant in Getx
Amazing
Thanks for listening
Thanks for that claps🎉
Kindly Post Complete Rest Api Model Which Means Multiple API Data Fetch , API Parameters , Headers Concept Returning Data By Validating Headers , Multiple Endpoints This Could be Help Us lot
Yes, good suggestion for advance level tutorial