Array<T extends NativeType, L extends List<int>>.fromList constructor

Array<T extends NativeType, L extends List<int>>.fromList(
  1. L list,
  2. L getView(
    1. Pointer<T>,
    2. int
    )
)

Implementation

factory Array.fromList(L list, L Function(Pointer<T>, int) getView) {
  final arr = Array(list.length, getView);
  arr.view.setAll(0, list);
  return arr;
}