encodeFloatField function
Encodes a float field (wire type 5) into buffer.
Proto3 rule: if value is 0.0, nothing is written.
The IEEE 754 single-precision value is serialized as a field tag followed
by 4 little-endian bytes.
Returns the same buffer list, possibly with bytes appended.
Implementation
List<int> encodeFloatField(List<int> buffer, int fieldNumber, double value) {
if (identical(value, 0.0)) return buffer;
encodeTag(buffer, fieldNumber, 5);
buffer.addAll(_encodeFloatBytes(value));
return buffer;
}