nullable property
When true
(the default), null
fields are handled gracefully when decoding null
and nonexistent values from JSON. This indicates that the fields from REST could be null
and is not related to Dart nullability.
Setting to false
eliminates null
verification in the generated code,
which reduces the code size. Errors may be thrown at runtime if null
values are encountered, but the original class should also implement
null
runtime validation if it's critical. Defaults to false
.
Implementation
final bool nullable;