fromJson static method

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

Implementation

static EmojiReaction? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return EmojiReaction(
    emoji: (json['emoji'] as String?) ?? '',
    title: (json['title'] as String?) ?? '',
    isActive: (json['is_active'] as bool?) ?? false,
    staticIcon:
        Sticker.fromJson(json['static_icon'] as Map<String, dynamic>?)!,
    appearAnimation:
        Sticker.fromJson(json['appear_animation'] as Map<String, dynamic>?)!,
    selectAnimation:
        Sticker.fromJson(json['select_animation'] as Map<String, dynamic>?)!,
    activateAnimation: Sticker.fromJson(
        json['activate_animation'] as Map<String, dynamic>?)!,
    effectAnimation:
        Sticker.fromJson(json['effect_animation'] as Map<String, dynamic>?)!,
    aroundAnimation:
        Sticker.fromJson(json['around_animation'] as Map<String, dynamic>?),
    centerAnimation:
        Sticker.fromJson(json['center_animation'] as Map<String, dynamic>?),
  );
}