A non code generated way to encode and decode JSON for flutter models.
Why We Reduce Code Generation?
All CI flutter cloud providers charge by the minute, so any effort we can do to reduce build time tends to reduce costs. In this case, with flutter builds, code generation can take up to 25 percent of the build time.
The code solution I am using was from dart server project that is now publically archived:
The dart server project itself was conduit-dart;
Basically, it was a fork of the popular dart server framework called aqueduct.
Encoding and Decoding JSON
We start out with a set of cast classes: