operator + method

  1. @Since('3.3')
Pointer<Int8> operator +(
  1. int offset

A pointer to the offsetth Int8 after this one.

Returns a pointer to the Int8 whose address is offset times the size of Int8 after the address of this pointer. That is (this + offset).address == this.address + offset * sizeOf<Int8>().

Also (this + offset).value is equivalent to this[offset], and similarly for setting.


Pointer<Int8> operator +(int offset) =>
    Pointer.fromAddress(address + sizeOf<Int8>() * offset);