google / google/built_value.dart
Could SerializeFor() warn if class doesn't have a serializer?
Open
p2 / feature request
- Dominant language
- Dart
- Stars
- 886
- Forks
- 195
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 4
Description
I have this:
```dart
@SerializersFor([
CellState,
])
final Serializers serializers = _$serializers;
```
But was getting an error about there being no serialiser for `$_CellState`. It took me a while to realise I needed to add the `serializer` to the class:
```dart
static Serializer get serializer => _$cellStateSerializer;
```
Is it possible a warning could be produced when building the code in this case, rather than waiting to throw at runtime?
Contributor guide
Assessment
This issue has not been assessed yet.