Animation.fromJson constructor

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

Parses a Animation from TDLib JSON.

Implementation

factory Animation.fromJson(Map<String, dynamic> json) => Animation(
      duration: _readInt(json['duration']),
      width: _readInt(json['width']),
      height: _readInt(json['height']),
      fileName: _readString(json['file_name']),
      mimeType: _readString(json['mime_type']),
      hasStickers: _readBool(json['has_stickers']),
      minithumbnail:
          _readOptional(json['minithumbnail'], Minithumbnail.fromJson),
      thumbnail: _readOptional(json['thumbnail'], Thumbnail.fromJson),
      animation: _readObject(json['animation'], File.fromJson),
    );