fromDict static method

NucleotideSequence fromDict(
  1. Map<String, dynamic> src
)

resume map.

Implementation

static NucleotideSequence fromDict(Map<String, dynamic> src) {
  Map<String, NucleotideInfo>? loadNInfo;
  if (src['nucleotideInfo'] != null) {
    loadNInfo = {};
    for (String i in (src['nucleotideInfo'] as Map).keys) {
      loadNInfo[i] = NucleotideInfo.fromDict(src['nucleotideInfo'][i]);
    }
  }
  NucleotideSequence r = NucleotideSequence("",
      type: EnumNucleotideSequenceType.values.byName(src['type']),
      id: src['id'],
      direction:
          EnumNucleotideSequenceDirection.values.byName(src['direction']),
      description: src['description'],
      info: src['info'],
      nucleotideInfo: loadNInfo);
  List<Nucleotide> seq = [];
  for (final i in src['sequence']) {
    seq.add(Nucleotide.fromDict(i));
  }
  r.sequence = seq;
  return r;
}