ProfilePhoto.fromJson constructor

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

Parses a ProfilePhoto from TDLib JSON.

Implementation

factory ProfilePhoto.fromJson(Map<String, dynamic> json) => ProfilePhoto(
      id: _readInt(json['id']),
      small: _readObject(json['small'], File.fromJson),
      big: _readObject(json['big'], File.fromJson),
      minithumbnail:
          _readOptional(json['minithumbnail'], Minithumbnail.fromJson),
      hasAnimation: _readBool(json['has_animation']),
      isPersonal: _readBool(json['is_personal']),
    );