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 {
280280 _setNonExtensionFieldUnchecked (meta, fi, value);
281281 }
282282
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.
284286 ///
285287 /// Works for both extended and non-extended fields.
286288 /// Suitable for public API.
Original file line number Diff line number Diff line change @@ -403,6 +403,8 @@ abstract class GeneratedMessage {
403403 }
404404
405405 /// 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.
406408 ///
407409 /// Throws an [ArgumentError] if [value] does not match the type associated
408410 /// with [tagNumber] .
You can’t perform that action at this time.
0 commit comments