MessageEffect.fromJson constructor

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

Parse from a json

Implementation

factory MessageEffect.fromJson(Map<String, dynamic> json) => MessageEffect(
      id: json['id'] is int ? json['id'] : int.parse(json['id']),
      staticIcon: json['static_icon'] == null
          ? null
          : Sticker.fromJson(json['static_icon']),
      emoji: json['emoji'],
      isPremium: json['is_premium'],
      type: MessageEffectType.fromJson(json['type']),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );