operator [] method Null safety

int? operator [](
  1. int address
)

Implementation

int? operator [](int address) {
  if (address < startAddress || address > endAddress) {
    throw RangeError.range(address, startAddress, endAddress, 'address');
  }

  return data[address - startAddress];
}