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 @@ -280,7 +280,9 @@ class _FieldSet {
280
280
_setNonExtensionFieldUnchecked (meta, fi, value);
281
281
}
282
282
283
- /// Sets a non-repeated nullable field with error-checking.
283
+ /// Sets a non-repeated field with error-checking.
284
+ /// This method behaves like [_setField] , except if `null` is passed as
285
+ /// value. In this case, [_clearField] will be called.
284
286
///
285
287
/// Works for both extended and non-extended fields.
286
288
/// Suitable for public API.
Original file line number Diff line number Diff line change @@ -403,6 +403,8 @@ abstract class GeneratedMessage {
403
403
}
404
404
405
405
/// Sets the value of a field by its [tagNumber] .
406
+ /// This method should be used for optional fields when the nullable option
407
+ /// is set. When `null` is passed as value, the field is cleared.
406
408
///
407
409
/// Throws an [ArgumentError] if [value] does not match the type associated
408
410
/// with [tagNumber] .
You can’t perform that action at this time.
0 commit comments