Array<T extends NativeType> constructor

Array<T extends NativeType>(
  1. int length,
  2. List<int> getView(
    1. Pointer<T> ptr,
    2. int length
    )
)

getView returns the associated typed list of the Pointer pointing to the array.

Implementation

Array(int length, List<int> Function(Pointer<T> ptr, int length) getView)
    : ptr = allocate<T>(count: length) {
  _view = getView(ptr, length);
}