StickerSet.fromMap constructor

StickerSet.fromMap(
  1. Map<String, dynamic> map
)

Implementation

StickerSet.fromMap(Map<String, dynamic> map) {
  extra = map['@extra'];
  client_id = map['@client_id'];
  id = map['id'];
  title = map['title'];
  name = map['name'];
  if (map['thumbnail'] != null) {
    thumbnail = TdApiMap.fromMap(map['thumbnail']) as Thumbnail;
  }
  if (map['thumbnail_outline'] != null) {
    thumbnail_outline = [];
    for (var someValue in map['thumbnail_outline']) {
      if (someValue != null) {
        thumbnail_outline?.add(TdApiMap.fromMap(someValue) as ClosedVectorPath);
      }
    }
  }
  is_installed = map['is_installed'];
  is_archived = map['is_archived'];
  is_official = map['is_official'];
  if (map['sticker_format'] != null) {
    sticker_format = TdApiMap.fromMap(map['sticker_format']) as StickerFormat;
  }
  if (map['sticker_type'] != null) {
    sticker_type = TdApiMap.fromMap(map['sticker_type']) as StickerType;
  }
  is_viewed = map['is_viewed'];
  if (map['stickers'] != null) {
    stickers = [];
    for (var someValue in map['stickers']) {
      if (someValue != null) {
        stickers?.add(TdApiMap.fromMap(someValue) as Sticker);
      }
    }
  }
  if (map['emojis'] != null) {
    emojis = [];
    for (var someValue in map['emojis']) {
      if (someValue != null) {
        emojis?.add(TdApiMap.fromMap(someValue) as Emojis);
      }
    }
  }
}