Flutter fromJson() to convert json to class object | Dart
Вставка
- Опубліковано 14 кві 2022
- You will see how to use named constructor fromJson() to convert json to class object. You will also see how to use jsonDecode() and fromJson() together
More here
www.dbestech.com/tutorials/da...
Buy me a coffee
www.buymeacoffee.com/dbestech... - Наука та технологія
Very excellent, simple and understandable.
Glad it was helpful!
Waalykumsalaam warahmatullahi wabarakatuh. Nice demonstration, barakallahu fiykum.
Like and share please
very very comprehensive.
Please explain it further with .map()...toList() methods, as in how do i know when its required in my code and what do they do?
You call .map() on a map object. You call this because you may want to change the value of the map's key or do something using those keys and values. Once you are done you return them as a list using toList(). If you use toList() it becomes a list. If it's a list them you can access the items using index.
So whenever you need a list from a map you would do this.
mapObject.entries.map((e)=>e.value).toList();
More here www.dbestech.com/tutorials/understanding-dart-map-and-list-for-flutter-development-explained-step-by-step-when-and-how-to-use
Please describe the next video for getand post with Filter how it works to explain other codes. thnks from kurdistan iraq see vido❤
easy to follow, great explanation. why cant i just store the decode json directly in the map?. i don't understand why the fromjson method is needed?
as beginer in dart i just read it doc,that shown fromJson is one of Factory constructor method,
Factory is class contructor that under main class which no produce instance like comons constuctor
but hasa the return value if Facotry constructor make task order to subordinary class
this fromJson method conver json format to object format ,i hope you will understand it
on the above presentation Mr.dbestech i think mr.dBestech use the Factory constructor but forget to put infront of the Task class or formJson on the above mentioned as named Constructor ? :)))
it should be like this : Factory Task.fromJson(Map json)
but in this case mr.Dbestech use named constructor because not mentioned write factory,
so the task in the above explanation is instance from named class :
Task task = new Task..fromJson(args as json format)
so from json = {"key1":value1, "key2":value2} become this : value1, value2 ( from method above0
HI Sir, Ive been following your tutorial for some while now, I can say it has really helped me a lot.
I have a question sir, I'm trying to build an app using firebase backend, in which a user(the host) can add another user(guest) to a role or task, and also keep track of the changes made by the added user
can you please suggest how I can implement this... thank you sir!
Hi Peter, thanks for commenting and asking. I am very familiar with firebase. So can not' help you much
@@dbestech can you suggest any other approach?
awesome, thanks
(did you forget to key your "subscribe" motion graphics? 🧐)
what do you mean?
@@dbestech By "keying", you can still maintain your lecture video visible underneath the Subscribe animation while its displayed, instead of green background.
@@TheAkhileshDas ok. Thanks. There were solved in later videos
Hi Bro,
can you please do tutorials on php procedural, mysql and flutter
big fan from India ❤️
Why don't you follow Laravel tutorial e-commerce flutter app?
@@dbestechi have created one entire e- commerce application with php procedural and mysql. I am searching for flutter with php procedural and mysql.
Your videos are too good bro.
I have to learn laravel from scratch ☹️☹️
Wa alaikum salam
what if the json has no keys and it is just values? like this: ["food", ""sleep", "rest, "breathe"].
json should has key like dictionary,if as you mention above that is List type List :))
0:46 bruh
Salaam
wa alaikum assalum
No proper response from developer for my last comment
Hi there, which comment?
وعليكم السلام
share your fb group link pls
facebook.com/groups/338913044520474