operator [] method Null safety

Value operator [](
  1. int i
)

Implementation

Value operator [](int i) {
  _memory.policy.checkRegisterAccess(i);
  final int npr = nybblesPerRegister;
  int addr = _memory.totalNybbles - 1 - (i + 1) * npr;
  // Address of most significant nybble - 1
  BigInt value = BigInt.zero;
  for (int i = 0; i < npr; i++) {
    value = (value << 4) | BigInt.from(_memory.storage.getUint8(++addr));
  }
  final result = Value.fromInternal(value);
  return result;
}