Closed fzyzcjy closed 1 year ago
Good catch!
So. It turns out this works IF you add a corresponding fromJson
factory ctor to your enum. Then all is good!
Going to close this out, but digging in here did help me find this fix – https://github.com/google/json_serializable.dart/pull/1307 – so thanks!
Minimal reproducible sample
Run it:
Alternatives: Adding
explicitToJson:true
, or making the key enum has no toJson does work