EncryptedPassportElement.fromMap constructor

EncryptedPassportElement.fromMap(
  1. Map<String, dynamic> map
)

Implementation

EncryptedPassportElement.fromMap(Map<String, dynamic> map) {
  extra = map['@extra'];
  client_id = map['@client_id'];
  if (map['type'] != null) {
    type = TdApiMap.fromMap(map['type']) as PassportElementType;
  }
  data = map['data'];
  if (map['front_side'] != null) {
    front_side = TdApiMap.fromMap(map['front_side']) as DatedFile;
  }
  if (map['reverse_side'] != null) {
    reverse_side = TdApiMap.fromMap(map['reverse_side']) as DatedFile;
  }
  if (map['selfie'] != null) {
    selfie = TdApiMap.fromMap(map['selfie']) as DatedFile;
  }
  if (map['translation'] != null) {
    translation = [];
    for (var someValue in map['translation']) {
      if (someValue != null) {
        translation?.add(TdApiMap.fromMap(someValue) as DatedFile);
      }
    }
  }
  if (map['files'] != null) {
    files = [];
    for (var someValue in map['files']) {
      if (someValue != null) {
        files?.add(TdApiMap.fromMap(someValue) as DatedFile);
      }
    }
  }
  value = map['value'];
  hash = map['hash'];
}