decodeJson method Null safety

void decodeJson(
  1. Map<String, dynamic> json
)

Implementation

void decodeJson(Map<String, dynamic> json) {
  final sto = json['storage'] as String;
  for (int i = 0; i < totalNybbles; i++) {
    storage.setUint8(i, int.parse(sto.substring(i, i + 1), radix: 16));
  }
  // Must come after storage.  cf. ProgramMemory.decodeJson().
  program.decodeJson(json['program'] as Map<String, dynamic>);
  registers._indexValue =
      Value.fromJson(json['I'] as String, maxInternal: Registers._maxI);
}