Part - 9 Flutter Get API call with Null Safety | Building List with Complex JSON using FutureBuilder

  Рет қаралды 33,214

The Tech Brothers

The Tech Brothers

Күн бұрын

Пікірлер: 131
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
source code: github.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example do give a start if it helped.
@syedshabbarraza6384
@syedshabbarraza6384 3 ай бұрын
Sir kisi sy bhi itni achi samajh nahi aye API ki jitni aap sy aye hai JAZAKAllah sir Bohot shukriya
@thetechbrotherss
@thetechbrotherss 3 ай бұрын
glad to hear this
@poetryiscodingdecoding7965
@poetryiscodingdecoding7965 Жыл бұрын
Never thought I would work on API's ..but when you get a good teacher....everything is so crystalline clear. Sir, keep on bringing more stuff with more projects.
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Glad to hear that, bro do subscribe and share with your friends
@codewithihsan2182
@codewithihsan2182 2 жыл бұрын
Thank You Sir as Always Keep it Up waiting for ChatApp from Scratch like this your explanation Method is Superb
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Sure, do subscribe and share with your friends.
@YashKhare-m5d
@YashKhare-m5d 8 ай бұрын
Must watch video for freshers.. Great going brother 😀
@thetechbrotherss
@thetechbrotherss 8 ай бұрын
Thank you so much 😀
@mafiyaking0888
@mafiyaking0888 Ай бұрын
Great work brother keep it up full support to you brother
@thetechbrotherss
@thetechbrotherss Ай бұрын
thank you
@Saansh6462
@Saansh6462 2 жыл бұрын
very very useful video at all... .thanks a lot.
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
You are most welcome, do like and share with your friends
@sadiaakterafrin7522
@sadiaakterafrin7522 2 жыл бұрын
great initiative sir... keep making videos for begginers like me
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you, i will post more content in future.
@basitali8309
@basitali8309 2 жыл бұрын
Great work.! Thank You Taj bhai. Really Enjoyed.
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Glad it helped, please share with your friends so most can make most out of it.
@muhammadshahzebsulemani4365
@muhammadshahzebsulemani4365 2 жыл бұрын
Very amazing and Interesting Video Sir!
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you do subscribe and share with your friends.
@yashmistry9635
@yashmistry9635 2 жыл бұрын
Sir can you make a video on what is model and why it is used and making model of complex and without complex object of an API but without using this plugin It will be much helpful for me sir to understand how things works
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Ok sure subscribe and share with your friends
@mazharnadeem8358
@mazharnadeem8358 2 жыл бұрын
awesome explaination..
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you do subscribe and share with your friends.
@harisyounus921
@harisyounus921 2 жыл бұрын
great work sir
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you
@rana_adnan218
@rana_adnan218 Жыл бұрын
very helpful Sir
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Glad to hear that
@imdadullah9093
@imdadullah9093 2 жыл бұрын
Text(snapshot.data![index].address!.city.toString()), sir what is this ! sign used for for null safety we use string?
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
! sign means data cannot be null
@MuhammadASIF-wu5sk
@MuhammadASIF-wu5sk 2 жыл бұрын
It shows te following error. When i use Usermodel. Fromjson(i) ; In for loop. Error. The argument type
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Its not error it’s pretty much clear your model has different variables go and change it to dynamic
@shahabuddin-pc8jr
@shahabuddin-pc8jr Жыл бұрын
i also facing this ,,how u resolved this?
@freelancermunim-eq4wm
@freelancermunim-eq4wm 6 ай бұрын
Sir I have a question...why did we use snapshot.data[index].data.title.toString() whereas we have used post[index].title.toString() for the same API in the previous video? and Thank you for the tutorial...respect from Bangladesh
@thetechbrotherss
@thetechbrotherss 6 ай бұрын
To be honest i don't remember now, i created this video long ago, but i must have explain this in the whole playlist
@syedshabbarraza6384
@syedshabbarraza6384 3 ай бұрын
I think both methods are identical and working same the difference only was previously we was first storing data to list them fetching and displaying directly from list But now we are just changed the path of fetching It just thing that I understand may be right may be wrong 🤷
@areebafarooq2694
@areebafarooq2694 2 жыл бұрын
if we have a json response start with curly brackets { response:1, code: 200, data: { "id":1, "name": areeba}} like this ... still would this be consider as a list???
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
ni array [ ] in symbol sy represent hoti ha r array he list hoti ha, please ma phr recommend krun ga ap basic json structure wali video dekhain r usko smhhain warna ap simple c api par bhi struggle karin ge
@areebafarooq2694
@areebafarooq2694 2 жыл бұрын
@@thetechbrotherss ok ok Thankyou
@test-yu2vn
@test-yu2vn 9 ай бұрын
HI thank you very much for this video, can plz make a video on listing of items with pagination while scrolling down
@thetechbrotherss
@thetechbrotherss 9 ай бұрын
ok
@abhaymaurya8116
@abhaymaurya8116 2 жыл бұрын
Plugin ke liye bhi thanks ...
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you
@demodemo9429
@demodemo9429 2 жыл бұрын
Tq for making this video bro 🙏🙏😇😇😇😇😇
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you do subscribe and share with your friends.
@demodemo9429
@demodemo9429 2 жыл бұрын
@@thetechbrotherss ofcourse bro 😃
@takirajani2693
@takirajani2693 2 жыл бұрын
Very good video..i liked this video and subscribe the channel.
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Thank you sir
@shahabuddin-pc8jr
@shahabuddin-pc8jr Жыл бұрын
sir g error di raha hae UserModel.fromjson yaha pi from json bilkul nahi ly raha hae,4 bar model ko dobara create kia or github si ap ka model b copy kia phir b nahi ho raha hae
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Please follow with me carefully you must be doing something wrong or always comment the error for exact answer
@S4eedKhan
@S4eedKhan 2 ай бұрын
Sir can you please tell me that why we used async snapshot at 11:56 because in previous two tutorials we didnt used it
@thetechbrotherss
@thetechbrotherss 2 ай бұрын
even if we didn't used it it's an async because it's future
@S4eedKhan
@S4eedKhan 2 ай бұрын
@@thetechbrotherss ok sir
@muhammadwaseem8731
@muhammadwaseem8731 2 жыл бұрын
Sir ya is ma adress wali complete body ko kesy show krwaingy? Jesy street , city, zipcode or suite jo address ki body hy isko hum 1 he dfa ma address ko mention krein or osmy city etc sb show ho jay?
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Full video dekho mainy sekhaya ha kaise kro gy
@abhaymaurya8116
@abhaymaurya8116 2 жыл бұрын
Awesome Bro...
@InspirationForLifeOfficials
@InspirationForLifeOfficials Жыл бұрын
Hello Sir, I'm practicing the same code, but found lot of errors, like. Aik jo JSONtoDart UserModel create kiya wo aik b bijaye 3 additional b generate hogaye khud he. 1. address.dart 2. Company.dart 3. Geo.dart Inhi 3no files mai errors a arahy. like. Address.fromJson(dynamic json) { jab address pr focus kro to error ata (Non-nullable instance field 'city' must be initialized) isi tarah in k sath required missing ka error ata jab k ap k pass aisa kuch nahi araha tha. Address({ this.street, this.suite, this.city, this.zipcode, this.geo,}); sir please guide
@Rmaqdas
@Rmaqdas Жыл бұрын
same issue
@khabibali4967
@khabibali4967 Жыл бұрын
same issue
@gamesden8021
@gamesden8021 4 ай бұрын
Sir agr array ka name nahi ho or uska inner ma objects ka keys same ho all objects ma tu model srif aik hi object ka Bana ga or agr same array case ho laikin objects ma nested object ajai tu bhi model first object ka Bana ga plzz answer me
@thetechbrotherss
@thetechbrotherss 4 ай бұрын
muje ap ka question smjh ni aya
@taimoormanzoor7386
@taimoormanzoor7386 2 жыл бұрын
Sir, can you tell me what does mean of null safety?
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Means data cannot be null
@asangborkar6210
@asangborkar6210 Жыл бұрын
To make sure we should get a null error we put a value which used when the data is not available
@asfarkhattakvlogs1108
@asfarkhattakvlogs1108 2 жыл бұрын
Hello asif bhaie , app api k through jab data get karte hien ,our for loop k andher map k sath i lagate hien . Us i ka actual work kia hie , muje i pe eroor ata hie bas .jis ki waja se mn data get nhi kar pa raha. For( map i in data ) there..
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Yeah loop chalta ha to store data in list r phr hm list ko show krwaty ha front end par
@asfarkhattakvlogs1108
@asfarkhattakvlogs1108 2 жыл бұрын
@@thetechbrotherss sir app quran api pe 1 video bana sakte hien plzz , jis me different apis use howe hote hien like for surahs ,ayahs and parahs
@test-yu2vn
@test-yu2vn 9 ай бұрын
Hi thank you very much for this video, i am getting error "The argument type 'Map' can't be assigned to the parameter type 'Map'." at getUserApi() function where 'userList.add(UserModel.fromJson(i));' can plz give suggest any thing
@thetechbrotherss
@thetechbrotherss 9 ай бұрын
go to model and change string to dynamic from this 'Map to this 'Map'
@priyankavishwakarma5550
@priyankavishwakarma5550 5 ай бұрын
@@thetechbrotherss thank you so much
@rana_adnan218
@rana_adnan218 Жыл бұрын
bro ham local server say data fetch kis trah ker sakty ha eg. koi hosting ya ham khud kay computer ko online rakh kar data ko apis kay throw apni app may show kerwa sakty ha? like a movie app.
@thetechbrotherss
@thetechbrotherss Жыл бұрын
local k liye koi local database bna lain
@rana_adnan218
@rana_adnan218 Жыл бұрын
@@thetechbrotherss bro wo kasy bnta ha koi hint da dy
@codeandtraveling796
@codeandtraveling796 2 жыл бұрын
Sir ap se ek request thi sir jo user wali api ap ne yaha call ki he is api ka ap modal per ek video banade pata to chale asi api ka agr khud modal banana hua to kase banayge without plugin please
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Agy agy jao sub kuch sekhaya ha
@codeandtraveling796
@codeandtraveling796 2 жыл бұрын
@@thetechbrotherss ok
@Yadnesh_
@Yadnesh_ 10 ай бұрын
Bro I am working on a project where I am getting an status video of 429 , where I have the function in that I have for loop in that I have try,catch . In try block I am calling the 3 api of same server but it gives me 429 status code error how to fix. It
@thetechbrotherss
@thetechbrotherss 10 ай бұрын
bro this is an error from server side, only backend developer can fix
@Yadnesh_
@Yadnesh_ 10 ай бұрын
@@thetechbrotherss the api has rate limit 2 per second, the first 2 api hits successful,but it gives error for last . I tried using future delay for 1-10 second but nothing worked,
@auliyasstory8316
@auliyasstory8316 Жыл бұрын
assalam Oalikom sir hum har api ko class ka andar define kar sakty hy ka nahi???
@thetechbrotherss
@thetechbrotherss Жыл бұрын
g
@UsmanNawaz-pq4sj
@UsmanNawaz-pq4sj Жыл бұрын
Salam sir ham na yaha par future builder ma Asyncsnapshot
@thetechbrotherss
@thetechbrotherss Жыл бұрын
q k hm list ko build kr rahy ha is liye
@mr.mateen
@mr.mateen Жыл бұрын
I do the same but I don't know why maine jo list create ki hai wo 4 times repeat ho rahi hai
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Do clear the list when you before fetching it
@mr.mateen
@mr.mateen Жыл бұрын
@@thetechbrotherss Thank you man I got it.
@MuslimUmmat
@MuslimUmmat Жыл бұрын
Asif bhai mera yeh perform hora hai 'CircularProgressIndicator(); ' laikin iskai baad white screen hai or name ,address user id nahi perform hore hain
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Chek api response in postman then check in your app and print snapshots for debugging
@MuslimUmmat
@MuslimUmmat Жыл бұрын
@@thetechbrotherss jazak Allah done
@g4gamer330
@g4gamer330 2 жыл бұрын
sir agar plugin kam na kara phair ham kia kara ga
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Plugin ka alternative dhondhain ya phr custom code karin channel par
@MuradAli-zt2rf
@MuradAli-zt2rf Жыл бұрын
Json to dart
@tapForSkyyy
@tapForSkyyy Жыл бұрын
Agar Api response object k sath ho to kya karni chahiye?
@thetechbrotherss
@thetechbrotherss Жыл бұрын
watch next videos you will get the answers. Then you don't need the list just create model directly.
@tapForSkyyy
@tapForSkyyy Жыл бұрын
@thetechbrotherss Okay, btw the video seems clear with your explanation. Thank you so much for it!
@narayanpaswan6558
@narayanpaswan6558 2 жыл бұрын
Sir agar paginate kiya huwa api aa raha ho. to usse kaise flutter me bind kare?
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Hello please follow this blog and you have your problem solved. www.kindacode.com/article/flutter-listview-pagination-load-more/
@auliyasstory8316
@auliyasstory8316 Жыл бұрын
Assalam Oalikom Sir Agar start object { } sy ho raha tu kasy get kary gy api ko
@thetechbrotherss
@thetechbrotherss Жыл бұрын
go ahead i taught it
@EbukaChikodi-ey3hi
@EbukaChikodi-ey3hi 11 ай бұрын
I wish you had English subtitles
@thetechbrotherss
@thetechbrotherss 11 ай бұрын
I wish 😢
@Hamza-dw4iw
@Hamza-dw4iw Жыл бұрын
why did we create our own model in previous video when we can do this way.
@thetechbrotherss
@thetechbrotherss Жыл бұрын
your must know all the methods, it helps you keep going
@auliyasstory8316
@auliyasstory8316 Жыл бұрын
mtlb without creating models
@thetechbrotherss
@thetechbrotherss Жыл бұрын
check video ap ko smjh aa jay ge
@pankajkhairnar621
@pankajkhairnar621 Жыл бұрын
Bhai, is vale video me , har line pe typing mistake ho rahi hai...
@thetechbrotherss
@thetechbrotherss Жыл бұрын
koi bat ni hota ha chalta ha
@Arjuns_World
@Arjuns_World Жыл бұрын
What if objects were different at different index
@thetechbrotherss
@thetechbrotherss Жыл бұрын
It doesn’t matter if you understand the json structure
@Arjuns_World
@Arjuns_World Жыл бұрын
@@thetechbrotherss but how will we access it in a list of the object names are different in every index
@Arjuns_World
@Arjuns_World Жыл бұрын
I will connect with you on LinkedIn for details
@Arjuns_World
@Arjuns_World Жыл бұрын
@@thetechbrotherss I am getting this kind of response "top_brands": { "PEX or Misc": { "image": "/brand-logo/brands/pex-or-misc.png", "count": 11214 }, "Baldwin": { "image": "/brand-logo/brands/baldwin.png", "count": 3070 }, "Kohler": { "image": "/brand-logo/brands/kohler-.png", "count": 2006 }, "Hansgrohe": { "image": "/brand-logo/brands/hansgrohe.png", "count": 1622 }, "Nibco": { "image": "/brand-logo/brands/nibco.png", "count": 1538 }, "Duravit": { "image": "/brand-logo/brands/duravit.png", "count": 1393 }, "American Standard": { "image": "/brand-logo/brands/american-standard.png", "count": 1375 }, "Graff": { "image": "/brand-logo/brands/graff.png", "count": 1338 }, "Delta": { "image": "/brand-logo/brands/delta.png", "count": 1116 }, "Toto": { "image": "/brand-logo/brands/toto.png", "count": 1031 } } }, { "vendor_name": "Zoro", "total_products": 6545, "total_brands": 139, "top_brands": { "Kohler": { "image": "/brand-logo/brands/kohler-.png", "count": 483 }, "Delta": { "image": "/brand-logo/brands/delta.png", "count": 476 }, "Toto": { "image": "/brand-logo/brands/toto.png", "count": 438 }, "Newport Brass": { "image": "/brand-logo/brands/newport-brass.png", "count": 435 }, "American Standard": { "image": "/brand-logo/brands/american-standard.png", "count": 381 }, "Blanco": { "image": "/brand-logo/brands/blanco.png", "count": 356 },
@Arjuns_World
@Arjuns_World Жыл бұрын
how do I make a list of Image of brands
@sameerali9613
@sameerali9613 2 жыл бұрын
❣❤❤
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
thank you
@muhammadrizwanshafiq5409
@muhammadrizwanshafiq5409 2 жыл бұрын
how would you get the api data that is like: { "work_experiance": [ { "id": "111", "organization": "GEEEEE", "designation": "Mobile Application Developer", "duration": "2021-Jan to Present", "from_exp": "2021-Jan", "to_exp": "Present", "description": "Mobile Application Development" } ], "skills": [ { "stdcode": "022", "skills": "Programming", "id": "453", "created_on": "2022-01-08 11:42:06", "created_by": null, "updated_on": "2022-01-08 11:42:06", "updated_by": null }, { "stdcode": "022", "skills": "Mathematics", "id": "454", "created_on": "2022-01-08 11:42:06", "created_by": null, "updated_on": "2022-01-08 11:42:06", "updated_by": null }, { "stdcode": "022-", "skills": "Data Analysis", "id": "455", "created_on": "2022-01-08 11:42:06", "created_by": null, "updated_on": "2022-01-08 11:42:06", "updated_by": null } ] }
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Its very easy watch part 11 and tutorial without model fetch api
@muhammadrizwanshafiq5409
@muhammadrizwanshafiq5409 2 жыл бұрын
@@thetechbrotherss thanks alot, you are such a life savior bro
@RoshniDevi-wj1eo
@RoshniDevi-wj1eo Жыл бұрын
Don't work steps😢
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Please follow playlist from start for better understanding
@somnathdas8922
@somnathdas8922 2 жыл бұрын
❤️💕🙏
@thetechbrotherss
@thetechbrotherss 2 жыл бұрын
Do subscribe and share it with your friends.
@affiliatemarking.347
@affiliatemarking.347 Жыл бұрын
make more video
@thetechbrotherss
@thetechbrotherss Жыл бұрын
This is a full playlist
@ShadabKhan-ib7me
@ShadabKhan-ib7me Жыл бұрын
@thetechbrotherss
@thetechbrotherss Жыл бұрын
Share with your friends
@khabibali4967
@khabibali4967 Жыл бұрын
when i try to create user model, it create 3 models extra like website, address, company what I do. I delete and built it again but same issue facing.
@thetechbrotherss
@thetechbrotherss Жыл бұрын
I didn't understood
@MdSamimTech
@MdSamimTech Жыл бұрын
If you are using Android studio extension then just change some settings of that extension while creating JSON TO DART.
@MdSamimTech
@MdSamimTech Жыл бұрын
​@@thetechbrothersshe is telling that after he creates any model with the extension the classes are automatically created in a separate file ,
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 6 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 1,8 МЛН
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 94 МЛН
ROSÉ & Bruno Mars - APT. (Official Music Video)
02:54
ROSÉ
Рет қаралды 314 МЛН
FutureBuilder
31:20
Mendter
Рет қаралды 1,6 М.
FutureBuilder In Flutter - Building Lists with JSON Data
15:30
Samarth Agarwal
Рет қаралды 253 М.
Future Builder In Flutter | Api call in flutter | Flutter Cache
13:42
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 6 МЛН