fromJson static method

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

Creates a object from a json

Implementation

static Audio fromJson(Map<String, dynamic> json) {
  return Audio(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    duration: json['duration']!,
    performer: json['performer'],
    title: json['title'],
    fileName: json['file_name'],
    mimeType: json['mime_type'],
    fileSize: json['file_size'],
    thumbnail: callIfNotNull(PhotoSize.fromJson, json['thumbnail']),
  );
}