fromJson static method

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

Creates a object from a json

Implementation

static Sticker fromJson(Map<String, dynamic> json) {
  return Sticker(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    type: json['type'],
    width: json['width']!,
    height: json['height']!,
    isAnimated: json['is_animated']!,
    isVideo: json['is_video']!,
    thumb: callIfNotNull(PhotoSize.fromJson, json['thumb']),
    emoji: json['emoji'],
    setName: json['set_name'],
    premiumAnimation: callIfNotNull(File.fromJson, json['premium_animation']),
    maskPosition: callIfNotNull(MaskPosition.fromJson, json['mask_position']),
    customEmojiId: json['custom_emoji_id'],
    fileSize: json['file_size'],
  );
}