Flutter: Auto Create Models from JSON | Serializable

preview_player
Показать описание
In this video, I will explain how to make model classes automatically from your json.

#Trending #Flutter #JSON

Please give stars for this project on git and like the video.

Be sure to ask for help in the comments.

Please Subscribe my channel to motivate me.

Connect with us on social media:

LIKE | SHARE | SUBSCRIBE FOR MORE VIDEOS LIKE THIS

THANKS FOR WATCHING!
Рекомендации по теме
Комментарии
Автор

I have been facing trouble with long ass json for a long time and this video just made my day. Thank you so much!!!

atiabjobayer
Автор

I have watched your videos for a long time now, and it's incredible seeing how the quality of your videos has simply skyrocketed. You have always been my go-to source, keep it up!

abhalla
Автор

I understand how to make this model but I cant understand How to implement these methods from the model. especially when I have nested json. Can anyone help!

combatcraz
Автор

Currently, I'm also using the JsonPlaceholder but I've installed it locally on my localhost. Since JsonPlaceholder doesn't support JWT, I've installed a jwt library jsonServer_auth. I've created separate project for my FlutterApp and one for my JsonServer. In JsonServer, I've added db.json file which displays all the json files from placeholder. So whenever I work on my project, I first run my JsonServer using json-server --watch db.json:auth so it would include the JWT feature. Now, my question would be, If i'm going to use this automated json_serialization, should I stop using my local jsonServer and db.json? Because I found it on your example that you copy pasted a json object into Post.json under models folder. Should I get rid of running my localhost jsonServer if use this json_serialization? Thank you so much.

manecioputik
Автор

Hello Pawan
but now what if i am getting my JSON from API calls and then how can i generate this model?
Your small guidance would be appreciated

rutvikphoto
Автор

hi bro, After this process. My App is not running. it gives griddle error

emfbiennialupw
Автор

hello..tried with same method but my command flutter packages pub run json_model does'nt run getting below error:


flutter : The term 'flutter' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ flutter packages pub run
+
+ CategoryInfo : ObjectNotFound: (flutter:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException




flutter doctor
flutter packages get runs successfully


Please help me asap

amruta
Автор

Somehow my build_runner script always ends up generating 0 outputs. It even happened when I was using MobX

DeprecatedAPI
Автор

Most important topic is covered, thank you

vishalmakam
Автор

Love it! Flutter china community is doing some really awesome stuff

raveeshdotme
Автор

thanks a lot for this tip it was really helpful. can you also explain how to create for dynamic lists of jsons having dynamic lists again

roshanroydsouza
Автор

Very good explanation. And there is no tutorial about full local json app with this metod. Maybe there is topic for You?

szarejas
Автор

Great explanation!
Can you please show that how to parse a nested array like below

[
"id": 1,
"name": "John",
"images": [
{
"imageId": 1,
"imageName": "Blue Sea"
},
{
"imageId": 5,
"imageName": "Blue Sky"
}
]
]

Thanks!!!

its_me_mahmud
Автор

Very informative video! Keep on churning 🔥

praharsh_bhatt
Автор

Hi bro,
Pls make a video on Paytm integration with flutter with the capabilities of payment accept and refund amount with no order like mpl game or any other game that ask to pay first for quiz, when you pass or win the game, then pay the double or the listed amount, hope you reply soon or come with a video. I searched on internet but couldn't find a single video in flutter about paytm

moviesu-noeo
Автор

Hey,
thanks for the good video.
How can I push the code generator if the json data should be stored in a folder that is not called "jsons"?

kendalltau
Автор

Hi nice tutorial, but without dealing with any packages you get it done by app.quicktype.io, thanks

RaviKumar-uyij
Автор

There are some nice sites just paste it and will genarate a model for it.

ThEGeEeK
Автор

cool :-)
i have do same thing a few month ago,
it's based on Javascript.

but i lost my script :(
aaa

It will be good, if's also can generate model from Postman,
and also http request example

blackclover
Автор

Hello, *awesome explanation*!
How can we use json_model with a structure like this:
[
{
"id": 1,
"name": "John"
},
{
"id": 2,
"name": "Doe"
}

]

MameMedouneDiopXpert