
Dart_Mappable - Flying High with Flutter #113
Flying High with Flutter
How to Name a Method That Transforms Your Data Class Into a Map
With Dart method, you'd say, OK, I have some JSON, and I want to decode it to my class. So in so of whatever generic parameter we want to put It will figure everything out itself and do that for you. With mapable, you have actually have like two sets of functions that can decode and encode your models. And then the signature is here like twoJSON output string. Other how it's done in the other packages is that twoJson is the one function that outputs a map. And then you have to encode it manually. That led to some difficulties. Some people liked that very much how I did it. Some people didn't like that very much.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.