toUint32List method

Uint32List? toUint32List(
  1. int length
)

Creates a Uint32List from this pointer by copying the pointer's data.

length is the length of the array.

null is returned if the pointer is equal to nullptr.

Implementation

Uint32List? toUint32List(int length) {
  if (this == nullptr) {
    return null;
  }
  final Uint32List list = Uint32List(length);
  for (int i = 0; i < length; i++) {
    list[i] = this[i];
  }
  return list;
}