MessageExtendedMediaPreview.fromJson constructor

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

Parse from a json

Implementation

factory MessageExtendedMediaPreview.fromJson(Map<String, dynamic> json) =>
    MessageExtendedMediaPreview(
      width: json['width'],
      height: json['height'],
      duration: json['duration'],
      minithumbnail: json['minithumbnail'] == null
          ? null
          : Minithumbnail.fromJson(json['minithumbnail']),
      caption: FormattedText.fromJson(json['caption']),
    );