elementAt method

Pointer<T> elementAt(
  1. int index
)

Pointer arithmetic (takes element size into account).

Throws an UnsupportedError if called on a pointer with an @unsized type argument.

Implementation

Pointer<T> elementAt(int index) {
  int? s = size;
  if (s != null) {
    return new Pointer<T>._(address + index * s, boundMemory, s);
  } else {
    throw new UnsupportedError(
        'elementAt is not supported for unsized types!');
  }
}