Animation.fromJson constructor

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

Creates a new Animation object from a JSON Map.

Implementation

factory Animation.fromJson(Map<String, dynamic> json) {
  return Animation(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    width: json['width']!,
    height: json['height']!,
    duration: json['duration']!,
    thumbnail: json['thumbnail'] != null
        ? PhotoSize.fromJson(json['thumbnail']!)
        : null,
    fileName: json['file_name'],
    mimeType: json['mime_type'],
    fileSize: json['file_size'],
  );
}