getFloat32 method

double getFloat32(
  1. int offset, [
  2. Endian endian = Endian.little
])

Reads 4-bytes as a floating point value.

The offset must satisy the relations 0offsetoffset+4this.length.

final Buffer buffer = Buffer.fromList([251, 33, 9, 64]);
final double value = buffer.getFloat32(0);
print(value); // 2.1426990032196045

Implementation

double getFloat32(final int offset, [final Endian endian = Endian.little]) {
  return asByteData().getFloat32(offset, endian);
}