onFp32Bits method

void onFp32Bits(
  1. int id,
  2. int bits
)

Delivered for an fp32 field whose payload is a NaN, carrying the raw 32-bit IEEE-754 bit pattern so a signaling NaN survives bit-for-bit — a Dart double would quiet it (CORELIB_PLAN §4.6: never normalize). The default widens to a double and forwards to onFp32, so a consumer that does not care about NaN bit patterns needs no change; override this to capture the exact bits (and re-emit them with Encoder.writeFp32Bits).

Implementation

void onFp32Bits(int id, int bits) {
  final b = ByteData(4)..setUint32(0, bits, Endian.little);
  onFp32(id, b.getFloat32(0, Endian.little));
}