You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have this simple code
Now
toJson
/fromJson
will transform these types to{ runtimeType: "SESAME" }
or{ runtimeType: "PEANUT" }
.What is the intended way, so that freezed generates
"SESAME"
/"PEANUT"
when invoking fromJson/toJson, and skips theMap
?I've tried a custom
JsonConverter
, and then attaching it to the freezed class, but it didn't work:Is there a simple way to achieve something like this?
Beta Was this translation helpful? Give feedback.
All reactions