VideoNote.fromJson constructor

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

Creates a VideoNote object from JSON object

Implementation

factory VideoNote.fromJson(Map<String, dynamic> json) {
  return VideoNote(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    length: json['length']!,
    duration: json['duration']!,
    thumbnail: json['thumbnail'] != null
        ? PhotoSize.fromJson(json['thumbnail']!)
        : null,
    fileSize: json['file_size'],
  );
}