If a field is nullable and the type does not match then set value to null #936
vinayak-idc
started this conversation in
Ideas
Replies: 1 comment
-
I assume you're talking about fromJson? That's not Freezed's responsibility. You can do that on your own by specifying a JsonConverter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let suppose you are calling an api and parsing using freezed
now if there are some changes in backend related to datatype
like :- id - before it was string now its int
our code will crash here, so can we check that is the data type do not match and our data type is nullable then it will print warning if in debugging mode and in app it will show null value or default value if there.
Beta Was this translation helpful? Give feedback.
All reactions