readAllFloat32 method

List<double> readAllFloat32(
  1. int length
)

Reads a List of 32-bit double values with a specified length.

Implementation

List<double> readAllFloat32(int length) {
  var bs = readBytes(length * 4);
  var byteData = ByteData.sublistView(bs);
  return List.generate(length, (i) => byteData.getFloat32(i * 4));
}