4min chapter

Flying High with Flutter cover image

Dart_Mappable - Flying High with Flutter #113

Flying High with Flutter

CHAPTER

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

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode