Open giacomomasseron opened 10 months ago
This still occurs right now. The error that causes this is when you call toJson()
, the "json" map that's being created has the Instance of the child instead of the Json map.
This should be addressed. We could have a workaround by adding .toJson()
to the child, but that's inconvenient.
Hi,
I have this parent class:
And this child class:
The script generates this code:
But I have an error cause
json['item']
is not a String, is aMap
that should be converted withItem.fromJson(json['item'] as Map<String, dynamic>)