InputIdentityDocument.fromJson constructor

InputIdentityDocument.fromJson(
  1. Map<String, dynamic> json
)

Parses a InputIdentityDocument from TDLib JSON.

Implementation

factory InputIdentityDocument.fromJson(Map<String, dynamic> json) =>
    InputIdentityDocument(
      number: _readString(json['number']),
      expirationDate: _readOptional(json['expiration_date'], Date.fromJson),
      frontSide: _readObject(json['front_side'], InputFile.fromJson),
      reverseSide: _readOptional(json['reverse_side'], InputFile.fromJson),
      selfie: _readOptional(json['selfie'], InputFile.fromJson),
      translation: _readList<InputFile>(
          json['translation'], (e) => _readObject(e, InputFile.fromJson)),
    );