运算符 - 方法
- @Since('3.3')
- int offset
指向此之前第 offset 个 Bool 的指针。
等同于 this + (-offset)。
返回一个指向 Bool 的指针,其地址为此指针地址之前 offset 倍的 Bool 的大小。即 (this - offset).address == this.address - offset * sizeOf<Bool>()。
此外,(this - offset).value 等同于 this[-offset],并且类似地适用于设置。
实现
@Since('3.3')
@pragma("vm:prefer-inline")
Pointer<Bool> operator -(int offset) =>
Pointer.fromAddress(address - sizeOf<Bool>() * offset);