Serialize complex (nested) objects and List of objects in Flutter/Dart

George Hristov
3 min readFeb 27, 2021

I want to tell you the story of a young programmer who wanted to do a nice serialization of complex objects in dart. This guy could go with code generation libraries like Freeze, but he wanted to have full control so he decided to go on his own. Unfortunately, there are no good tutorials about it, so he had to spend a lot of time figuring out the proper way of doing it and I want to share this knowledge with you right now.

Let’s assume we have a data structure like this:

--

--