StickerSet.fromJson constructor

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

Parses a StickerSet from TDLib JSON.

Implementation

factory StickerSet.fromJson(Map<String, dynamic> json) => StickerSet(
  id: _readInt(json['id']),
  title: _readString(json['title']),
  name: _readString(json['name']),
  thumbnail: _readOptional(json['thumbnail'], Thumbnail.fromJson),
  thumbnailOutline: _readOptional(
    json['thumbnail_outline'],
    Outline.fromJson,
  ),
  isOwned: _readBool(json['is_owned']),
  isInstalled: _readBool(json['is_installed']),
  isArchived: _readBool(json['is_archived']),
  isOfficial: _readBool(json['is_official']),
  stickerType: _readObject(json['sticker_type'], StickerType.fromJson),
  needsRepainting: _readBool(json['needs_repainting']),
  isAllowedAsChatEmojiStatus: _readBool(
    json['is_allowed_as_chat_emoji_status'],
  ),
  isViewed: _readBool(json['is_viewed']),
  stickers: _readList<Sticker>(
    json['stickers'],
    (e) => _readObject(e, Sticker.fromJson),
  ),
  emojis: _readList<Emojis>(
    json['emojis'],
    (e) => _readObject(e, Emojis.fromJson),
  ),
  extra: json['@extra'],
  clientId: _readClientId(json['@client_id']),
);