StickerSet.fromJson constructor

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

Creates a StickerSet object from JSON object

Implementation

factory StickerSet.fromJson(Map<String, dynamic> json) {
  return StickerSet(
    name: json['name'] as String,
    title: json['title'] as String,
    stickerType: StickerType.fromJson(json['sticker_type'] as String),
    stickers: (json['stickers'] as List<dynamic>)
        .map((e) => Sticker.fromJson(e as Map<String, dynamic>))
        .toList(),
    thumbnail: json['thumbnail'] == null
        ? null
        : PhotoSize.fromJson(json['thumbnail'] as Map<String, dynamic>),
  );
}