google / google/json_serializable.dart
Support annotations on ctor params when there is no associated field
Open
Type: enhancement
- Dominant language
- Dart
- Stars
- 1.6k
- Forks
- 461
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
See https://github.com/dart-lang/json_serializable/issues/285#issuecomment-415609028
```dart
@JsonSerializable(createToJson: false)
class LogisticsItem {
final bool logisticsChecked;
final bool logisticsOK;
LogisticsItem(@JsonKey(name: 'LogistikTeileInOrdnung') String processed)
: logisticsChecked = processed != null && processed != 'null',
logisticsOK = processed == 'true';
}
```
Contributor guide
Assessment
This issue has not been assessed yet.