Did you know?
As of Dart 3.5.0 (master channel), you can preview the experimental JsonCodable
macro.
This macro augments your classes with fromJson
and toJson
methods, and it works in realtime as you edit your code (no code generation is needed).
As of May 2024, JsonCodable is not configurable and has two big limitations:
- field names must exactly match the keys in the maps
- default values are not supported
If you want to have a play with it, read the official docs for how to enable it:
Previous | Next |
---|---|
Useful Aliases for Flutter Development | Transform SVG assets at build time |