for those people who are facing issue in map function in for loop, map function is a little bit modified so here is the code that u have to copy paste for (Map i in data) { postList.add(PostsModel.fromJson(i)); }
Not working - 14:58 when you print postList length in list view I write exact same code but my phone screen is empty not getting any data in listview. Try everything.
sir when we started the loop for (map i in data){ postlist.add(postmodel.formjson(i)); } in this code the i is not working in fromjson code. it through the error and not working.
for those people who are facing issue in map function in for loop, map function is a little bit modified so here is the code that u have to copy paste for (Map i in data) { postList.add(PostsModel.fromJson(i)); }
Hi sir Im getting an error, please help for (Map i in data) { postList.add(PostsModel.fromJson(i)); } The i value in line postList.add(PostsModel.fromJson(i)); is giving the following error The argument type 'Map' can't be assigned to the parameter type 'Map'
Assalam O Alekum..... Jesa k aap ne kaha k agar post API ka jo response hai agar us mai se list yani k array ka naam hota to hamara model achay se ban jaata, kya model ko sahi tarah se banane k liye hum us response ko explicitly change nahi kar saktay ? kya hum is pooray response ko object mai wrap kar k is list ko naam nahi de saktay?
Can you please provide the JSON to dart model convertor extension in visual studio code because I am trying to download different Jason to dart converter it was not workin
if statment ko execute kr k loading show ho rha screen pr agy move nai kr rha else tk?aysa q ho rha hy ..JsonToDart plugin kamnai krr rr to google pr Json to dart use key ta kya uss wja sy data show nai ho rha yaa kia issue ho skta hy?
Sir using this methos app runs smmoth on emulator and show response but on physical device it gives error after giving internet acces in .xml file and building apk it it showing blank screen
Asalam u Alaikum Respected Sir, in line 24 where you use for loop for(Map I in data){ postList.add(myModel.fromJson(i)); is not working for me with the help of gemini I got this code which is working correctly postList = (data as List).map((i) => myModel.fromJson(i)).toList();
@@thetechbrotherss Thanks Sir, Looking forward to meet you someday'' Yesterday a friend told me that I usually see Asif Taj in IT Park Peshawar,donno if its true or not
List is returning list data in async you can define whatever the data type returning it could be bool, i suggest you watch my widget of the week series for better understanding of future and stream builder with snapshot. do subscribe and share with your friends. support me on insta: instagram.com/thetechbrotherss/
sir jab ma postmodel ki file bna raha hn to mera pas 4 files create ho rahi hain,, 1 address.dart 2 company.dart 3 geo.dart aur json place holder sa data copy kia ha and same data ha array sa start ha
The body might complete normally, causing 'null' to be returned, but the return type, 'Widget', is a potentially non-nullable type. this error is coming
hello brother please help me with this ---------- The name 'PostsModel' isn't a type so it can't be used as a type argument.-------- I am getting this error but you are not
Bro i have already provided your the content you need to learn how to utilise things according to your requirements based on concepts you have learn. This is actual development.
Excellent Sir ! Sir tell me command in android studio for wrap with widgets. What command you type for wrap with widgets? Here control+ Enter not working for wrap with widgets
Hello brother! everything is fine but i don't understand the line object.fromJson/toJson ? what is the functinality of these two functions ? if u would discuss then would be more helpful for me!
sir please yeah answer kardain ky for(map i in data) yeah ju likhna hai woh list ma jason ky object ko add karna ky liya likha hai na or yeah map kuhn use kiya hai plz
Sir I wants to make Netflix clone app with authentication features using firebase and I will use apis to get movies so the problem here is that how should I make my folder structure so that it looks professional
Sir mera code run hogya h pr mujhe steps yaad nhi rehti h...mujhe prior knowledge nhi h programming ki dart hi first language h jo me sikh rha hu...plz guide what i have to do
Sir i coded it in android studio and in this code i have no error, when i run it in chrome web it is showing me no data, its showing blank page is there any solution for this issue. How can I run it in Google Chrome as well?
Sir you explained everything very greatly in this video, but I don't know why this entire concept of creating List and FutureBuilder seemed very difficult to me, or maybe I need to watch it multiple times to understand it properly.
Please watched my video on expansion list and then part 10 of this video series. You will get your answers. And yes i reply to every comment and feel free to contact via social media platform.
@@thetechbrotherss Yes Thank you for that and I have watched it , but in settings of jsonToDart which to be preffered. It is very canfusing as I have tried it.
postList.add(PostsModel.fromJson(i)); here (i) variable giving red mark. it's saying "The argument type 'Map' can't be assigned to the parameter type 'Map"
@@thetechbrotherss isma b jub Hum for(Map i in data){ Model.add(PostModel.fromJson(i));//jub isko i assign karty han to kehta hye k Map ki value dain iska koi hall bta dain plz }
hlo asif sir mere api connectivity me non nullable ka problems aa rha h pls sir how to resolve that problems pls pls guide me sir pls pls pls pls pls pls pls pls pls plspls plsp lsp
If your response start with object and then you some array inside that object and those objects have some same name parameter then it won't work. But you can fix this issue manually but this takes time.
source code:
github.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example
do give a start if you it helped.
already given you star and shared with friends, wish you, to get more stars. amazing tutorials series
for those people who are facing issue in map function in for loop, map function is a little bit modified so here is the code that u have to copy paste
for (Map i in data) {
postList.add(PostsModel.fromJson(i));
}
It's not necessary , it will work the way i taught them but most of the student didn't follow carefully that's why they faced isssues
Yes you are right. I face this problem for one whole day.
@@thetechbrotherss Sir he says right.
Thanks for helping
I was also facing that issue thanks for sharing
Dhanyawad bro. Yadi apke jese guru ho sikhane ko to kisi ko koi doubt nahi rahega and again thanks bro...❤️
Thank you subscribe kr dain share kr dain doston k sath
struggling from past 4 days with APIs integration now finally understand it very well ........love from INDIA sir
Share with your friends
1st time I feel like APi's are easy to integrate ❤️ big respect for you!
Share with your friends
Appreciate your Sophistication of HardWork for Public 😍
Thank you so much 😀
You deserve millions of subscriber sirr, jus t love how you explained APIs so easily, I was finding it difficult to understand from a very long time
Share with your friends
Sir one by one tut dekha bhaut ache se apne explained kiya hai. Eager for next continue tut video post.
Hopefully we will cover this series this week.
Thanks you sir muje bohot kuch sikhne ko mila muje bohot problem hoti jab api call karta tha par ab muje dout clear hogye Thanks
Great it helped, do subscribe, like the video and share it with your friends.
JAZAKAllah sir aaj bhi aap ki waja sy kuch new sekhny ko mila
glad to hear this
The argument type 'Map' can't be assigned to the parameter type 'Map' this erroe showing up when doing step you did at 12:02 min in video
Error is self explanatory click on this error go to the model and change string to dynamic and please watch video carefully till end.
Change the Map to "Map
Not working - 14:58 when you print postList length in list view
I write exact same code but my phone screen is empty not getting any data in listview.
Try everything.
test api in postman and then follow the process carefully
@@thetechbrotherss Already didi it API works well in postman
sir proper smj aaya best tutorial sir ji👍👍😊 i'm from india ❤
mazy kro
Wow sir thankyou so much fir this! I need this kind of tutorial thankyou sir 🙂love from india💌
Thank you pleas share with your friends
The explanation was awosome. I would never need to ask Google for the materials you have covered in the lecture... Love from Flutter Interns : )
Thank you sir
sir when we started the loop
for (map i in data){
postlist.add(postmodel.formjson(i));
}
in this code the i is not working in fromjson code. it through the error and not working.
Check you must he doing something wrong
for those people who are facing issue in map function in for loop, map function is a little bit modified so here is the code that u have to copy paste
for (Map i in data) {
postList.add(PostsModel.fromJson(i));
}
Thanks, Buddy finally Caught all the concepts till here IDK why but I took 5 retakes then I got it
hahahahhah this is experience, support me on insta: instagram.com/thetechbrotherss/
explained very well... wait for next video
Will upload very soon. Hopefully will complete this series this week.
11:24 I was not able to follow the process there. Could you explain the for loop again?
These are type of loops, we are looping on data
best tutorial I have seen in youtube
Thank you
very nice and easy explanation sir
Thank you do share with your friends
19:28 pr custom list jo banai hai us ko clear ku karty hain? can someone expalin reason behind it.
taky api hit ho to data replicate na ho
Amazing video brother! Keep it up!
Thank you subscribe
End level 💯
Subscribe
Bro v nice keep it up i follow your play list and learn a lot about api and abele to integrate api in my freelance projects.
Glad to hear that, so subscribe and share with your friend.
@@thetechbrotherss sure sir
Hi sir Im getting an error, please help
for (Map i in data) {
postList.add(PostsModel.fromJson(i));
}
The i value in line postList.add(PostsModel.fromJson(i)); is giving the following error
The argument type 'Map' can't be assigned to the parameter type 'Map'
user 'Map as message is self explanatory.
Go to your model and change it.
write for(Map i in data) insted of for(Map i in data)
@@muhammadjavedrafique4592 brother i used this but now its give me this error for data ( the type string used in for loop must implemnt iterable)
bro when i print "i" it throw error 😑
Assalam O Alekum.....
Jesa k aap ne kaha k agar post API ka jo response hai agar us mai se list yani k array ka naam hota to hamara model achay se ban jaata, kya model ko sahi tarah se banane k liye hum us response ko explicitly change nahi kar saktay ? kya hum is pooray response ko object mai wrap kar k is list ko naam nahi de saktay?
JSON response backend engineer bnata ha ap usko jaise kahin gy wo set kr dy ga r ap easyly handle kr lain
excellent video. very nice explanation
thank you do subscribe and share with your friends
salam sir sir ma na ya poucha na tha ka ap na for loop ka bahar q return kar wa ya hai data ku andar bhi tu hu sakhta tha
Taky data return ho
I have a question.. please give me reply. Why we are creating model for JSON? I don't understand, why it is need?
To parse data and show them on front end
@@thetechbrotherss ok.thanks
very well explained
Thanks for liking
Can you please provide the JSON to dart model convertor extension in visual studio code because I am trying to download different Jason to dart converter it was not workin
You can use any online website for JSON to dart converter. I have not used VS code so i don't know.
did u solve this error
Crystal Clear explaination.thank you sirr :)
Go ahead you will love it, make sure to read the description and first comment. Do subscribe and share with your friends
The argument type 'Map' can't be assigned to the parameter type 'Map'.dart
It's clear, go the model and change string to dynamic
@@thetechbrotherss thanks ho gya he
@@hammadahmad7963 bro can you tell me how you did this, mera nahi ho rha asy
ho gyaaaa.....
if statment ko execute kr k loading show ho rha screen pr agy move nai kr rha else tk?aysa q ho rha hy ..JsonToDart plugin kamnai krr rr to google pr Json to dart use key ta kya uss wja sy data show nai ho rha yaa kia issue ho skta hy?
aise is liye ho raha ha k q k ap check ni kr rahy k error kahan par ha
use try and catch
Sir I got error in postList.add(PostModel.fromJson(i));
in (i)
share the error
Great explanation sir 👍👍👍
Thank you please share with in your circle.
I Love your video great work sir ❤
Share within your circle
we can't decode data without checking response code (10:15) this is flow error
to decode you have to wait for the response
Sir using this methos app runs smmoth on emulator and show response but on physical device it gives error after giving internet acces in .xml file and building apk it it showing blank screen
it means ap k parent widget ma issues ha, use expanded and write place
Asalam u Alaikum Respected Sir,
in line 24 where you use for loop
for(Map I in data){
postList.add(myModel.fromJson(i)); is not working for me
with the help of gemini I got this code which is working correctly
postList = (data as List).map((i) => myModel.fromJson(i)).toList();
nice
@@thetechbrotherss Thanks Sir,
Looking forward to meet you someday''
Yesterday a friend told me that I usually see Asif Taj in IT Park Peshawar,donno if its true or not
If anyone have error
in for loop
Use
for (map i in data)
Sahi ho gya to comment ko update kr dain
Can't get output of api integrarion in chrome?
yes
Sir can tell me what the difference between if I use that "AsyncSnapshot snapshot" or only "snapshot"?
List is returning list data in async you can define whatever the data type returning it could be bool, i suggest you watch my widget of the week series for better understanding of future and stream builder with snapshot.
do subscribe and share with your friends.
support me on insta: instagram.com/thetechbrotherss/
sir jab ma postmodel ki file bna raha hn to mera pas 4 files create ho rahi hain,,
1 address.dart
2 company.dart
3 geo.dart
aur json place holder sa data copy kia ha and same data ha array sa start ha
ap extra parameter select kr rahy ho
@@thetechbrotherss Thank sir.
why i am not familiar with this code i think i am missing some pre-requisite for this code to understand i cant understand this syntax
Start from first video
The body might complete normally, causing 'null' to be returned, but the return type, 'Widget', is a potentially non-nullable type. this error is coming
Please follow the video carefully it say data is coming null
sir Assalam walikom
sir mai vscode use kar raha hu mai konsi extension use karu please sir i am stucked off.
search json to dart on google
so hamein pehle api se model nikalna hoga postman se, and than usko convert krna hoga?
g
hello brother please help me with this ---------- The name 'PostsModel' isn't a type so it can't be used as a type argument.-------- I am getting this error but you are not
watch video carefully
you are doing something wrong
hello, I am not able to select that option new file Json to dart, how to solve this?
Watch part 5 and 6 to create models for api
Nice video....
Thanks, do subscribe and share within your friend circle.
@@thetechbrotherss i have already done..sir will u plz make this video....?
Bro i have already provided your the content you need to learn how to utilise things according to your requirements based on concepts you have learn. This is actual development.
bro love from india
Glad you liked it bro, do share with your friends.
Apko bolne ki zaroorat nhi hai phele hi krdia yeh sab
Apki instagram I'd kiya hai ?
Sir i got error when i create class name PostsModel it's not show posts-model.dart
Please follow carefully 🥲
Excellent Sir ! Sir tell me command in android studio for wrap with widgets. What command you type for wrap with widgets? Here control+ Enter not working for wrap with widgets
Btaie ro ha alr + shift
@@thetechbrotherss
Alt+Enter se huwa thanks Sir..
Hello brother! everything is fine but i don't understand the line object.fromJson/toJson ? what is the functinality of these two functions ? if u would discuss then would be more helpful for me!
it map the values if you change the parameter name in model you will null values
sir please yeah answer kardain ky for(map i in data) yeah ju likhna hai woh list ma jason ky object ko add karna ky liya likha hai na or yeah map kuhn use kiya hai plz
g
thanks for making this video
It's my pleasure
Sir I wants to make Netflix clone app with authentication features using firebase and I will use apis to get movies so the problem here is that how should I make my folder structure so that it looks professional
check my clean code playlist
Thanks soo much for this
subscribe and share with you friends
how to pass a query when i log in and the id from that login will go to the url?
I didn't understand your question
sir why we use snapshot in the future builder widget
this is just a name you can use any name, it returns different states
Is it necessary to create Live REST API's to integrate them with flutter?
You must know to integrate apis with flutter
hey brother the api response returns null.
any solution
check api again and test it in postman.
yeh error sy pareshan hu kya kru _TypeError (type '_InternalLinkedHashMap' is not a subtype of type 'Iterable')
Please follow the video carefully it's not list
Sir mera code run hogya h pr mujhe steps yaad nhi rehti h...mujhe prior knowledge nhi h programming ki dart hi first language h jo me sikh rha hu...plz guide what i have to do
Bhai muje bhi yad ni rehta, ap concepts clear kro
brother snaps hot data hasData is true but kuch b show hii ho rha?? na title na id
Data parse ni ho raha hoga na
i dint get the API only loading is showing at top of the screen
so plzz help
Please print snapshots, test api in postman
can you please explain the use of postList.clear() that you added ?
It clear the data to avoid duplicating the data
should i call async func inside build
you can using future widgets
FormatException (FormatException: Unexpected character (at character 1)
^
)
I am getting this error
i think url is not correct, test the api in postman
Hi, thanks for the video. I have issue. when i am trying to display the id and userid. it is showing error. Can you please explain how to do that
share the error please always
@@thetechbrotherss it was resolved thank you.
Sir i coded it in android studio and in this code i have no error, when i run it in chrome web it is showing me no data, its showing blank page is there any solution for this issue. How can I run it in Google Chrome as well?
Wrap the futurebuilder with expanded widget
check for exceptions, add internet permissions
Sir you explained everything very greatly in this video, but I don't know why this entire concept of creating List and FutureBuilder seemed very difficult to me, or maybe I need to watch it multiple times to understand it properly.
First time it's always difficult with practice and as you move forward it will be very easy
@@thetechbrotherss In Shaa Allah sir I'll try practicing it!
Give me same project done with expansion list with builder and data from local json file... Plz....sir reply......
Please watched my video on expansion list and then part 10 of this video series. You will get your answers. And yes i reply to every comment and feel free to contact via social media platform.
@@thetechbrotherss give ur fb contact....
See description
In part 10 just place the the code of my expansion tile video into your if block snapshot.has and see the magic.
Hello maine same code likha hai phir bhi loading ... Hii show hota hai what is the reason behind this ???
use try catch to catch the error
I skipped the ! operator in the following code. Check if you made the same mistake.
if (!snapshot.hasData) {
return const Text('loading');
am getting error at homescreen page, Map i in data=> in getting error
Please watch video carefully, understand the concepts and fix it. You must be doing something wrong
nice sir
thank you
I am subscribed to utr videos. Please explain How to use JsonToDart using android studio build json model
please watch part 5 and 6 i teach how you can do that
@@thetechbrotherss Yes Thank you for that and I have watched it , but in settings of jsonToDart which to be preffered. It is very canfusing as I have tried it.
sir this Api code is not working .
It’s working bro
sir sime aap jaisa code kia hai likin screen per Text k ilawa kuch or show nahi ho raha
ap ny kuch mistake ki hogi double check it
same code no error still API not working?
Api is working check again you must be flint something wrong
i think snapshot mai data nahe arha sirf loading show kr raha hai kya karo ab?
@@thetechbrotherss thank you for your reply and last mai maine apka code pora copy keya still not hit api
I dont understand , what is null safety ? and how i understand when null safety or not ?
null safety means value cannot be null for variable
why we crate model plz explain
to parse value to ui by maping data
what is the purpose of postList.clear().
to clear the list before adding the data into list to avoid duplication
Sir g humna jo i use kiya ha wo tu kahi declear ni krwaya tu wo kesy use ho gya
Bhai loop ha na
Sir i think the line 22 code should be inside the if statement starting at line 23
I don't remember right now but you can learn the procedure and implement it
nice
This API code is not working
It’s working bro check the comments working with everyone
postList.add(PostsModel.fromJson(i)); here (i) variable giving red mark. it's saying "The argument type 'Map' can't be assigned to the parameter type 'Map"
String to dynamic kr do
@@thetechbrotherss (i as dynamic).... now it's working. thanks
Sir, how to create your own api(i mean real API) ? is there any specific platform for it...
use node js
@@thetechbrotherss thanks
sir kindly also explain the model .from json, tojson,encoe,decode,etc..
already explained
@@thetechbrotherss can u please share yhe video link
ya asa ho k ap ki API dynamic ho means bar bar change ho rhi ho to>?
phr apko streams use krni parhin ge
@@thetechbrotherss isma b jub Hum
for(Map i in data){
Model.add(PostModel.fromJson(i));//jub isko i assign karty han to kehta hye k Map ki value dain iska koi hall bta dain plz
}
sir, you have shown only 3 screens in this video, but there are lot of screens in the source code.
it's a complete playlist
@@thetechbrotherss oops! sorry. I didn't notice. Thankyou sir
Osm video
Thank you
hlo asif sir mere api connectivity me non nullable ka problems aa rha h pls sir how to resolve that problems pls pls guide me sir pls pls pls pls pls pls pls pls pls plspls plsp lsp
tnx bro..
do share with your friend
what if i have name for my array to tell
If your response start with object and then you some array inside that object and those objects have some same name parameter then it won't work. But you can fix this issue manually but this takes time.
@@thetechbrotherss okay thanks
Boss Please make video about dio...plz
ok
I can't find PostsModel key word its giving error Kindly help bro
please follow the video carefully
@@thetechbrotherss its done thanks