fromDict static method

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

resume map.

Implementation

static AminoAcidSequence fromDict(Map<String, dynamic> src) {
  Map<String, AminoAcidInfo>? loadAAInfo;
  if (src['aminoAcidInfo'] != null) {
    loadAAInfo = {};
    for (String i in (src['aminoAcidInfo'] as Map).keys) {
      loadAAInfo[i] = AminoAcidInfo.fromDict(src['aminoAcidInfo'][i]);
    }
  }
  AminoAcidSequence r = AminoAcidSequence.fromSeq([],
      id: src['id'],
      direction:
          EnumAminoAcidSequenceDirection.values.byName(src['direction']),
      description: src['description'],
      info: src['info'],
      aminoAcidInfo: loadAAInfo);
  List<AminoAcid> seq = [];
  for (final i in src['sequence']) {
    seq.add(AminoAcid.fromDict(i));
  }
  r.sequence = seq;
  return r;
}