MessageEffect.fromJson constructor

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

Parses a MessageEffect from TDLib JSON.

Implementation

factory MessageEffect.fromJson(Map<String, dynamic> json) => MessageEffect(
  id: _readInt(json['id']),
  staticIcon: _readOptional(json['static_icon'], Sticker.fromJson),
  emoji: _readString(json['emoji']),
  isPremium: _readBool(json['is_premium']),
  type: _readObject(json['type'], MessageEffectType.fromJson),
  extra: json['@extra'],
  clientId: _readClientId(json['@client_id']),
);