TypedData getRandomValues(TypedData array)

Source

TypedData getRandomValues(TypedData array) {
  var random = _getRandomValues(array);
  // The semantics of the operation are that it modifies the argument, but we
  // have no way of making a Dart typed data created initially in Dart reference
  // externalized storage. So we copy the values back from the returned copy.
  // TODO(alanknight): Make this less ridiculously slow.
  for (var i = 0; i < random.length; i++) {
    array[i] = random[i];
  }
  return array;
}