File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
protobuf/lib/src/protobuf Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,9 @@ class _FieldSet {
279
279
_setNonExtensionFieldUnchecked (meta, fi, value);
280
280
}
281
281
282
- /// Sets a non-repeated nullable field with error-checking.
282
+ /// Sets a non-repeated field with error-checking.
283
+ /// This method behaves like [_setField] , except if `null` is passed as
284
+ /// value. In this case, [_clearField] will be called.
283
285
///
284
286
/// Works for both extended and non-extended fields.
285
287
/// Suitable for public API.
Original file line number Diff line number Diff line change @@ -418,6 +418,8 @@ abstract class GeneratedMessage {
418
418
}
419
419
420
420
/// Sets the value of a field by its [tagNumber] .
421
+ /// This method should be used for optional fields when the nullable option
422
+ /// is set. When `null` is passed as value, the field is cleared.
421
423
///
422
424
/// Throws an [ArgumentError] if [value] does not match the type associated
423
425
/// with [tagNumber] .
You can’t perform that action at this time.
0 commit comments