operator []= method Null safety

void operator []=(
  1. int i,
  2. Value v
)

Implementation

void operator []=(int i, Value v) {
  _memory.policy.checkRegisterAccess(i);
  final int npr = nybblesPerRegister;
  BigInt value = v.internal;
  int addr = _memory.totalNybbles - 1 - i * npr;
  // Address of least significant nybble
  for (int i = 0; i < npr; i++) {
    _memory.storage.setUint8(addr--, (value & _low4).toInt());
    value >>= 4;
  }
  _model.needsSave = true;
}