google / google/built_value.dart
`null` value isn't retained on a ListBuilder field of Builder class that is marked @nullable on Built class
Open
question
- Dominant language
- Dart
- Stars
- 886
- Forks
- 195
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 4
Description
my code:
```dart
abstract class MyClass implements Built {
@nullable
@BuiltValueField(wireName: r'my_field')
BuiltList get myField;
}
```
is being generated to
```
class MyClassBuilder implements Builder {
ListBuilder _myField;
ListBuilder get myField =>
_$this._myField ??= new ListBuilder();
set myField(ListBuilder myField) =>
_$this._myField = myField;
}
```
When I set value of `myField` to `null`, I was expecting it to return `null` on get, but it returns empty list instead (because of how the getter above is generated)
Appreciate any help on this matter! Thanks
Contributor guide
Assessment
This issue has not been assessed yet.