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