k-paxian / dart-json-mapper

Serialize / Deserialize Dart Objects to / from JSON
https://pub.dev/packages/dart_json_mapper
Other
400 stars 33 forks source link

Broken code sample from documentation `Field '_name' has not been initialized` #175

Closed BaptisteMagoni closed 2 years ago

BaptisteMagoni commented 2 years ago

Hello,

I try to user your library but i have encountered a problem.

I use 2.15.1 sdk version and when i test your simple exemple for deserialize json to object i have this error message 'Field 'field_name' has not been initialized'.

image

Thank you in advance for your answer.

k-paxian commented 2 years ago

Thank you so much for noticing that. That was a stale code sample prior to null safety dart feature support. Documentation has been updated.

BaptisteMagoni commented 2 years ago

Thank you for your reactivity :)