File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ class JsonKey {
90
90
/// Valid only on enum fields with a compatible enum value.
91
91
final Object ? unknownEnumValue;
92
92
93
+ /// `true` if this field should not be serialized.
94
+ ///
95
+ /// Fields annotated with [extra] set to true will not be included in JSON
96
+ /// output, and their values may be passed in as additional arguments
97
+ /// alongside JSON data in the deserialization function.
98
+ ///
99
+ /// If `null` (the default) or false, this argument has no effect.
93
100
final bool ? extra;
94
101
95
102
/// Creates a new [JsonKey] instance.
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ is generated:
94
94
| | | [ JsonKey.required] |
95
95
| | | [ JsonKey.toJson] |
96
96
| | | [ JsonKey.unknownEnumValue] |
97
+ | | | [ JsonKey.extra] |
97
98
98
99
[ JsonSerializable.anyMap ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonSerializable/anyMap.html
99
100
[ JsonSerializable.checked ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonSerializable/checked.html
@@ -114,6 +115,7 @@ is generated:
114
115
[ JsonKey.required ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/required.html
115
116
[ JsonKey.toJson ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html
116
117
[ JsonKey.unknownEnumValue ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/unknownEnumValue.html
118
+ [ JsonKey.extra ] : https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/extra.html
117
119
118
120
> Note: every ` JsonSerializable ` field is configurable via ` build.yaml ` –
119
121
see the table for the corresponding key.
You can’t perform that action at this time.
0 commit comments