writeFloat32 method

void writeFloat32(
  1. double value
)

Implementation

void writeFloat32(double value) {
  final fb = Float32List(1);
  fb[0] = value;
  final b = Uint8List.view(fb.buffer);
  if (bigEndian) {
    writeByte(b[3]);
    writeByte(b[2]);
    writeByte(b[1]);
    writeByte(b[0]);
    return;
  }
  writeByte(b[0]);
  writeByte(b[1]);
  writeByte(b[2]);
  writeByte(b[3]);
}