toFloat32List method

Float32List toFloat32List(
  1. int length
)

Creates a Dart view on a pointer to floats in native memory, cast as a Float32List. This method does not copy the data out of native memory.

Throws an exception if the method is called on a nullptr.

Implementation

Float32List toFloat32List(int length) {
  if (isNullPointer) {
    throw Exception('Unexpectedly called `toFloat32List` on nullptr');
  }
  RangeError.checkNotNegative(length, 'length');
  return cast<Float>().asTypedList(length);
}