fromMap static method

EmojiReaction? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static EmojiReaction? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var emoji = _map['emoji']! as String;
  var title = _map['title']! as String;
  var is_active = _map['is_active']! as bool;
  var static_icon = Sticker.fromMap(_map['static_icon'])!;
  var appear_animation = Sticker.fromMap(_map['appear_animation'])!;
  var select_animation = Sticker.fromMap(_map['select_animation'])!;
  var activate_animation = Sticker.fromMap(_map['activate_animation'])!;
  var effect_animation = Sticker.fromMap(_map['effect_animation'])!;
  var around_animation = Sticker.fromMap(_map['around_animation']);
  var center_animation = Sticker.fromMap(_map['center_animation']);
  return EmojiReaction(
    extra: extra,
    clientId: clientId,
    emoji: emoji,
    title: title,
    is_active: is_active,
    static_icon: static_icon,
    appear_animation: appear_animation,
    select_animation: select_animation,
    activate_animation: activate_animation,
    effect_animation: effect_animation,
    around_animation: around_animation,
    center_animation: center_animation,
  );
}